473,714 Members | 2,572 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 2101
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
3409
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
15066
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
6115
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
25983
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
8051
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
6019
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
4080
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
8796
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
9307
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9009
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7946
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6627
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5943
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
4462
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
4715
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2105
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.