VBS获取服务的信息


Set WMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") 
Set ListOfServices = WMIService.ExecQuery("Select * from Win32_Service Where name ='" & name & "'") 

For Each obj In ListOfServices 
MsgBox  obj.DisplayName
Exit For 
Next 

有关服务的详细属性,请参考MSDN中有关Win32_Service的部分

猜你喜欢

转载自blog.csdn.net/project4gogo/article/details/10070899
vbs