We help IT Professionals succeed at work.

Search the list of processes running in XP

FIIS-VSO
FIIS-VSO asked
on
Medium Priority
228 Views
Last Modified: 2010-04-23
I'm building a program plug-in that requires me to perform checks on the program upon application start-up. The problem is that I only want to perform these checks if the program is currently running.

In order to check to see if the program is running, the only solution I can think of is searching the image names of the processes that are running for an instance of the program. (Like the "Image Names" under the "Processes" tab of the Windows Task Manager)

If anyone could help me with any hints on how to go about doing this, it'd be greatly appreciated! 300 points to a good example!

P.S. If there's any other way someone can think of to check to see if the program is already running, let me know!
Comment
Watch Question

Commented:
Try this:

'This will output current processes to a textbox named txt_processes

'Declare array to store processes.
Dim ProcessArray As Array

'Insert processes into array
ProcessArray = System.Diagnostics.Process.GetProcesses

'Declare integer for for loop to display each process
Dim i As Integer

For i = 0 To UBound(ProcessArray)
     txt_processes.Text = txt_processes.Text & ProcessArray(i).ToString & vbCrLf
Next
CERTIFIED EXPERT
Commented:

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.