473,473 Members | 1,813 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

running process list?

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

Similar topics

2
by: Michael Schmitt | last post by:
Hello. What is the usual way for running functions in parallel on a multiple-processor machine. Actually I want to run a single computationally expensive function with different parameter sets....
5
by: Roger | last post by:
I would like to get a list of running processes on a remote machine. How is this possible via VB.Net? Is it possible? Can someone point me in the right direction. thanks, rog
7
by: Joecx | last post by:
Hi Does anyone have the code or maybe give me a start on how to detect if my program is already running if someone tries to run it again while it's already running? I know I could do this with a...
3
by: Billg_sd | last post by:
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 |...
3
by: Thom Little | last post by:
During an uninstall, how can I check to see if the application I an uninstalling is currently running? -- -- Thom Little -- www.tlaNET.net -- Thom Little Associates, Ltd. --
8
by: ChrisBowringGG | last post by:
When you use Application.Quit() on an Excel application, there can still be an instance of Excel running, as seen in Task Manager. You can try following the advice on MSDN: ...
4
by: sneffe | last post by:
Hi, im writing a program to keep track of which programs is currently running. I would like to have the caption of running programs displayed in a textbox on my form. I cant seem to find an easy way...
5
by: Kevin | last post by:
how can I get a list of applications running on the system (the list that appears in the applications tab of the task manager) and set one of them active? I am trying to have my app find other...
1
by: Anonieko | last post by:
Query: How to display progress bar for long running page Answer: Yet another solution. REFERENCE: http://www.eggheadcafe.com/articles/20050108.asp My only regret is that when click the...
2
by: Mike P | last post by:
I am programmatically starting and ending a local instance of Outlook : //programmatically start local Outlook System.Diagnostics.Process proc = new System.Diagnostics.Process();...
0
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
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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
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
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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
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.