471,603 Members | 1,503 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,603 software developers and data experts.

Access running process.

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
2 2646
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
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.

Similar topics

18 posts views Thread by Andre Laplume via AccessMonster.com | last post: by
1 post views Thread by cpajoe2001 | last post: by
2 posts views Thread by =?Utf-8?B?bXVyYWRqYW1lcw==?= | last post: by
2 posts views Thread by =?Utf-8?B?bXVyYWRqYW1lcw==?= | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by MichaelMortimer | last post: by
reply views Thread by CCCYYYY | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.