By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,948 Members | 1,570 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,948 IT Pros & Developers. It's quick & easy.

Access running process.

P: n/a
I have console application open running that you need to press Escape
on to get it to exit. Usually once a day/week etc I want to close that
process and start it again. Is there any way to find a process running
on a machine and send a command to it from a c# app? I don't think this
application was written in .net so it wouldn't be managed code.

Dec 22 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
You might want to try the SendKeys class. It will allow you to send a
character sequence to the active application.

Ideally though, you would re-write this app to be a service, and then
send a pause or stop command to the service, and then just start it back up.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<fi*******@gmail.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
I have console application open running that you need to press Escape
on to get it to exit. Usually once a day/week etc I want to close that
process and start it again. Is there any way to find a process running
on a machine and send a command to it from a c# app? I don't think this
application was written in .net so it wouldn't be managed code.

Dec 23 '05 #2

P: n/a
see inline

Willy.

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:ex**************@TK2MSFTNGP12.phx.gbl...
You might want to try the SendKeys class. It will allow you to send a
character sequence to the active application.

Don't think SendKeys can be used to send key sequences to console program.

Ideally though, you would re-write this app to be a service, and then
send a pause or stop command to the service, and then just start it back
up.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<fi*******@gmail.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
I have console application open running that you need to press Escape
on to get it to exit. Usually once a day/week etc I want to close that
process and start it again. Is there any way to find a process running
on a machine and send a command to it from a c# app? I don't think this
application was written in .net so it wouldn't be managed code.


Dec 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.