windows自动检测某进程,存在就杀掉

windows自动检测某进程,存在就杀掉


run.vbs

do
strComputer="." 
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") 
Set colProcessList=objWMIService.ExecQuery ("select * from Win32_Process where Name='notepad.exe' ")
For Each objProcess in colProcessList 
objProcess.Terminate() 
next
wscript.sleep 5000
loop

需要停止就去任务管理器杀掉

你可能感兴趣的:(windows,windows,进程)