running process list?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a programatic way in VB.NET to determine if a specific process is
running?

During an app update, I need to check if the component I'm about to replace
is running. In UNIX I'd use: PS | grep -i MyApp

Can this be done in .Net?
 
Try using the System.Diagnostics.Process.GetProcesses() or
System.Diagnostics.Process.GetProcessByName(), they return an array of
Process objects.


Chris
 
Rob,
The article was great, and covers similar topics to what I'm looking for.
I'm looking for example code to achive the following objective:
I want to build a vb.net app that's sole job is to (when double-clicked by
the user) search for a single process on the local machine. If the process
is running (active, present, etc.) then the vb app will not allow a second
instance of the process to be opened. If the process is not running, then
the vb should allow the process (application) to open. Can you point me in
the right direction to find a similar code example?

Thanks!

Rob Windsor said:
Check out this article:

Examine Running Processes Using Both Managed and Unmanaged Code
http://msdn.microsoft.com/msdnmag/issues/04/10/NETProcessBrowser/default.aspx

--
Rob Windsor [MVP-VB]
G6 Consulting
Toronto, Canada
http://msmvps.com/windsor/


Billg_sd said:
Is there a programatic way in VB.NET to determine if a specific process is
running?

During an app update, I need to check if the component I'm about to replace
is running. In UNIX I'd use: PS | grep -i MyApp

Can this be done in .Net?
 
Back
Top