回复 1# zinet - strComputer = "."
- Set WS = CreateObject("wscript.shell")
-
- Set objWMIService = GetObject("winmgmts:" _
- & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
- Set colProcessList = objWMIService.ExecQuery _
- ("Select * from Win32_Process Where ExecutablePath like 'C:\\Program Files\\123%'")
- For Each objProcess in colProcessList
- objProcess.Terminate()
- Next
-
- WS.Run WS.CurrentDirectory+"\abc.exe", 0, TRUE
复制代码
|