473,503 Members | 5,382 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4764
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
3468
by: william | last post by:
Hi, I have an application which uses XML config file This application can be run twice or more on different config files There can't be parallel execution on the same config file My question is,...
4
1558
by: david_mys | last post by:
I have a strange problem: in visual C# i have 3 projects using a shared project. When I run these projects (either in debug or release mode and either from visual studio or directly from a...
4
13584
by: mdb | last post by:
When I view my running processes with SysInternals Process Explorer, most of the processes have actual names (called "Description" in Process Explorer) and Company Names set for the process. Mine...
2
14577
by: Scirious | last post by:
People, when executing a Java application the procces name given to it usually java.exe or javaw.exe. But how can I make it be called by the name of my application? Thanks, Scirious.
0
2100
by: Asad Asad | last post by:
How can I hide a process name in Taskmanager,in Visual Basic 6.0? I can hide/unhide a application(which is running) name in taskmanager by using following code: Private Sub Command1_Click()...
5
2139
by: herman | last post by:
Hi, I would like to find out all the process id with the process name 'emacs'. In the shell, i can do this: $ ps -ef |grep emacs root 20731 8690 0 12:37 pts/2 00:00:09...
2
1668
by: apuente | last post by:
I created a service host which loads an assembly which contains the service processing code. This way I only have to write the service code once and new services only require coding of the service...
1
1808
by: sudhivns | last post by:
Hi , VB Script, is there any method to find the process ID using Process name. Thanks, Sudhi
0
1306
by: gloris | last post by:
Hi, What is the best way in python find the process name and owner? Now i use WMI, but this version is too slow.
0
7067
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7264
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7316
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7449
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3160
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3148
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1495
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
371
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.