Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Looking for a running process

Status
Not open for further replies.

plyon70

Programmer
Feb 22, 2005
11
US
I need to write an app that basically looks for a running process on the network and then if it doesn't see the process running for "x" amount of seconds to start an application locally. I know how to write the "timer" and to call the app but I do not know how to have it look for the process. What is the best or most efficient way to do this?

It is not a service but just an application that is running.
 
To find out if a process is running on the local machine i use

If Process.GetProcessesByName("MyProcess").Length = 1 Then
'Runnning
End if

BUt i think you can use


If Process.GetProcessesByName("MyProcess", "ServerName").Length = 1 Then
'Runnning
End if

 
On the local machine, you can use the plist utility available from the sysinternals website.

If you're looking for an app to be running on the current subnet, then the app will need to broadcast it's appearance, or be listening on a pre-defined port so that it can respond to an identification query.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Or if the service makes itself known to the Active Directory, you could try to find it there.

-Rick

----------------------
[banghead]If you're about to post an ASP.Net question,
please don't do it in the VB.Net forum[banghead]

[monkey] I believe in killer coding ninja monkeys.[monkey]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top