By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,372 Members | 1,333 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,372 IT Pros & Developers. It's quick & easy.

running process list?

P: n/a
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?
Nov 22 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Try using the System.Diagnostics.Process.GetProcesses() or
System.Diagnostics.Process.GetProcessByName(), they return an array of
Process objects.
Chris

"Billg_sd" <Bi*****@discussions.microsoft.com> wrote in message
news:40**********************************@microsof t.com...
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?

Nov 22 '05 #2

P: n/a
Check out this article:

Examine Running Processes Using Both Managed and Unmanaged Code
http://msdn.microsoft.com/msdnmag/is...r/default.aspx

--
Rob Windsor [MVP-VB]
G6 Consulting
Toronto, Canada
http://msmvps.com/windsor/
"Billg_sd" <Bi*****@discussions.microsoft.com> wrote in message
news:40**********************************@microsof t.com...
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?

Nov 22 '05 #3

P: n/a
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 [MVP]" wrote:
Check out this article:

Examine Running Processes Using Both Managed and Unmanaged Code
http://msdn.microsoft.com/msdnmag/is...r/default.aspx

--
Rob Windsor [MVP-VB]
G6 Consulting
Toronto, Canada
http://msmvps.com/windsor/
"Billg_sd" <Bi*****@discussions.microsoft.com> wrote in message
news:40**********************************@microsof t.com...
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?


Nov 22 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.