471,318 Members | 2,612 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Process Name = ?

UJ
Is the name of process always the name of executable that is running? I'm
assuming a single process for a program. So in other words - if I want to
check if a program is running, can I do a
Process [] localByName = Process.GetProcessesByName( << Name of
executible without extension>> );

Will that work?

TIA - Jeff.
Feb 10 '06 #1
4 4674
Hi,
"UJ" <fr**@nowhere.com> wrote in message
news:uI**************@TK2MSFTNGP09.phx.gbl...
Is the name of process always the name of executable that is running? I'm
assuming a single process for a program. So in other words - if I want to
check if a program is running, can I do a
Process [] localByName = Process.GetProcessesByName( << Name of
executible without extension>> );

Will that work?

IIRC there are ways to change the name of the process, not only that but you
could find at a later date that somebody else selected the same name for a
completely unrelated program.

Is the target program yours?

What are you tring to do?
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Feb 10 '06 #2
UJ
The target program is something I've written. I'm trying to find out if the
program is running and if so, shut it down. This is part of an auto update
process where I'll download a new program and then shut the program down (if
it's currently running) and restart it.

J.

"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote
in message news:Ot**************@TK2MSFTNGP12.phx.gbl...
Hi,
"UJ" <fr**@nowhere.com> wrote in message
news:uI**************@TK2MSFTNGP09.phx.gbl...
Is the name of process always the name of executable that is running? I'm
assuming a single process for a program. So in other words - if I want to
check if a program is running, can I do a
Process [] localByName = Process.GetProcessesByName( << Name of
executible without extension>> );

Will that work?

IIRC there are ways to change the name of the process, not only that but
you could find at a later date that somebody else selected the same name
for a completely unrelated program.

Is the target program yours?

What are you tring to do?
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

Feb 10 '06 #3
Hi,
"UJ" <fr**@nowhere.com> wrote in message
news:uK**************@TK2MSFTNGP10.phx.gbl...
The target program is something I've written. I'm trying to find out if
the program is running and if so, shut it down. This is part of an auto
update process where I'll download a new program and then shut the program
down (if it's currently running) and restart it.


Then I suggest you to use something else, take a look at this
http://www.yoda.arachsys.com/csharp/...ation.instance you can
use something similar for your objective.

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Feb 10 '06 #4
UJ
Cool. Thanks. That looks like a good way to do it.

J.

"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote
in message news:uw**************@TK2MSFTNGP12.phx.gbl...
Hi,
"UJ" <fr**@nowhere.com> wrote in message
news:uK**************@TK2MSFTNGP10.phx.gbl...
The target program is something I've written. I'm trying to find out if
the program is running and if so, shut it down. This is part of an auto
update process where I'll download a new program and then shut the
program down (if it's currently running) and restart it.


Then I suggest you to use something else, take a look at this
http://www.yoda.arachsys.com/csharp/...ation.instance you can
use something similar for your objective.

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

Feb 10 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by william | last post: by
4 posts views Thread by david_mys | last post: by
4 posts views Thread by mdb | last post: by
2 posts views Thread by Scirious | last post: by
reply views Thread by rosydwin | 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.