描述
返回在 Services.exe 进程中运行的服务的列表。

脚本代码
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{ impersonationLevel=impersonate }!\\" & strComputer & "\root\cimv2")
Set colListOfServices = objWMIService.ExecQuery _
("Select * from Win32_Service")
For Each objService in colListOfServices
If objService.PathName = "C:\WINDOWS\system32\services.exe" Then
Wscript.Echo objService.DisplayName
End If
Next



本文转自 苏繁 51CTO博客,原文链接:http://blog.51cto.com/goxia/221131,如需转载请自行联系原作者