472,993 Members | 2,388 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,993 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 4744
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
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
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
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
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
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
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
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
by: sudhivns | last post by:
Hi , VB Script, is there any method to find the process ID using Process name. Thanks, Sudhi
0
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.
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.