Option Explicit
Dim strComputer,objWMIService,colProcessList
strComputer = "."
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery("Select * from Win32_Process Where Name = 'javaw.exe'")
If colProcessList.Count>0 Then
WScript.Echo "运行"
Else
WScript.Echo "没运行"
End If
Set objWMIService = Nothing
Set colProcessList = Nothing
Wscript.quit