killprocess.vbs

strComputer = InputBox("请输入计算机名或者IP地址", "输入")
strProcess = InputBox("请输入要关闭的进程", "输入")
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery _
("Select * from Win32_Process Where Name = '" & strProcess &"'" )
For Each objProcess in colProcessList
objProcess.Terminate()
Next

你可能感兴趣的:(process)