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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stopping a running program 1

Status
Not open for further replies.

joevig

Programmer
Feb 17, 2005
4
CA
How can I check and see if a particular program is running and if it is running, stop it. I'm using VB6

Thanks
 
You need the process id of the program.

To get the process id (PID), use the plist utility available at sysinternals.com. Run it via the shell command, redirecting the output to a text file.

You can then read & parse the text file to find the PID. You would then use another program from sysinternals called pkill to kill the PID.

Note that if you kill the wrong process you kill Windows, making your users very angry, and likely to use a Illudium Q-36 Explosive Space Modulator on you.

Chip H.


____________________________________________________________________
Click here to learn Ways to help with Tsunami Relief
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top