473,915 Members | 5,967 Online
Bytes | Software Development & Data Engineering Community
+ 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 2156
Try using the System.Diagnost ics.Process.Get Processes() or
System.Diagnost ics.Process.Get ProcessByName() , they return an array of
Process objects.
Chris

"Billg_sd" <Bi*****@discus sions.microsoft .com> wrote in message
news:40******** *************** ***********@mic rosoft.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*****@discus sions.microsoft .com> wrote in message
news:40******** *************** ***********@mic rosoft.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*****@discus sions.microsoft .com> wrote in message
news:40******** *************** ***********@mic rosoft.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
3415
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. Running the functions in different threads doesn't seem to work, because of the global interpreter lock. Would it help to fork processes, which run the single function with a given parameter set? Is there any simple way, how this forked worker...
5
15075
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
6136
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 dummy file by putting something in the file while it's running and emptying the file when it's not running, but I was hoping for something a little more professional. Has anyone done this yet? Joe
3
442
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 | grep -i MyApp Can this be done in .Net?
3
293
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
25992
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: http://support.microsoft.com/kb/Q317109 but this didn't solve the problem for me.
4
821
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 to do this in vb.net. Does anybody have a piece of code that can help me? Thanks
5
8079
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 running apps and switch focus to one of them thanks kevin
1
6044
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 browser back button, it loads the progress bar again. Any solution to this?
2
4088
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(); proc.StartInfo.FileName = "outlook.exe"; proc.Start(); ///code proc.Kill();
0
10039
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9881
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10923
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7256
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5943
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6148
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4778
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 we have to send another system
2
4344
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3368
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.