'执行方法:直接双击vbs文件 或者 通过cmd.exe 下 cscript.exe "指定脚本的路径"
'利用Vbs脚本实现 显示系统服务里表
'Creator : Eric1991 Date: 2013-11-1 0:25
strComputer = "."
Set objWMIService = GetObject("winmgmts:" & "\\" & strComputer & "\root\cimv2")
Set colServices = objWMIService.ExecQuery("Select * from Win32_Service")
For Each objService in colServices
Wscript.Echo objService.DisplayName & "|" & objService.State
Next