MsgBox("","",_wmi_getserviceStarted(".","Print Spooler"))
Func _wmi_getserviceStarted($ip,$Caption)
Local $objWMIService = ObjGet("winmgmts:\" & $ip& "\root\CIMV2")
$colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_Service", "WQL",48)
For $objItem In $colItems
If $objItem.Caption =$Caption Then Return $objItem.Started;表示服务是启动(true)还是停止(false)
Next
EndFunc