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!

get process ID then kill process

Status
Not open for further replies.

andy4479

Technical User
Dec 6, 2008
1
ID
Can someone help me?
 
Take a look at WMI and Win32_Process

...quick example of seeing the processes using WMI

Code:
Option Explicit

Dim objWMIService : Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")
Dim colProcesses : Set colProcesses = objWMIService.ExecQuery("SELECT * FROM Win32_Process")
Dim objProcess
For Each objProcess In colProcesses
	WScript.Echo objProcess.Name
Next

The query can be specific to whatever information that is part of the class and with the Termiate method you can kill it.

see the documentation:
--------------------------------------------------------------------------------
dm4ever
My philosophy: K.I.S.S - Keep It Simple Stupid
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top