另存为kill.vbs双击执行即可。- 'Author: Demon
- 'Website: http://demon.tw
- 'Date: 2012/7/19
- 'On Error Resume Next
-
- strComputer = "."
- Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
- Set colItems = objWMIService.ExecQuery("Select * from Win32_Process",,48)
-
- For Each objItem in colItems
- If StrComp(objItem.Name, "java.exe", vbTextCompare) = 0 Then
- If InStr(objItem.CommandLine, "1.jar", vbTextCompare) > 0 Then
- objItem.Terminate
- End If
- End If
- Next
复制代码
|