KenzoIT Posted April 25, 2010 Share Posted April 25, 2010 (edited) Hi all, I would like to check services status on the server such as zabbix_agent.exe, snmp.exe, vmware-authd.exe,...And, this is my code : $ProcessName = "zabbix_agentd.exe" If ProcessExists($ProcessName) Then MsgBox(0,"Services Status",$ProcessName & " is running.") Else MsgBox(0,"Services Status",$ProcessName & " is not running.") EndIf I don't know how to do it in order to show all services in MsgBox ? Please instruct me to this case. Thanks ! Edited April 25, 2010 by KenzoIT Link to comment Share on other sites More sharing options...
MrMitchell Posted April 25, 2010 Share Posted April 25, 2010 (edited) Something like this maybe? $processList = "explorer.exe,scite.exe,taskmgr.exe" $aProcessList = StringSplit($processList, ',', 2) $msgBoxString = "" For $each In $aProcessList If ProcessExists($each) Then $msgBoxString &= $each & " is running." & @CRLF Else $msgBoxString &= $each & " is not running." & @CRLF EndIf Next MsgBox(0, "Service Status", $msgBoxString) Edited April 25, 2010 by MrMitchell Link to comment Share on other sites More sharing options...
KenzoIT Posted April 25, 2010 Author Share Posted April 25, 2010 Here is what I need. Thanks for your instruction ! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now