如何用vbs结束进程

试试调用下taskkill.exe
Dim wshShell
Set wshShell = WScript.CreateObject("WScript.Shell")
wshShell.run "TASKKILL /im 1.exe",0

可能执行效率有些低,我也新手呵呵
找了一下 这个是别人的
strComputer="."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colProcessList=objWMIService.ExecQuery ("select * from Win32_Process where Name='1.exe' ")
For Each objProcess in colProcessList
objProcess.Terminate()
Next
呵呵比我的长,不过效率高一点

你可能感兴趣的:(vbs)