懒码农。。。。。。

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
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
posted on 2011-05-09 14:40  阿彬  阅读(215)  评论(0编辑  收藏  举报