strComputer = "."
strProcessToKill = array( "a.exe", "b.exe" )
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate , (Debug)}!\\" & strComputer & "\root\cimv2")
For Each pss in strProcessToKill
Set colProcess = objWMIService.ExecQuery ("Select * from Win32_Process Where Name = '" & pss & "'")
For Each objProcess in colProcess
objProcess.Terminate()
Next
next

최근 덧글