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的部分