I think I would need to get the colletion of a specific process... but this is where I get lost.
Any help is greatly appreciated. Also assume I know nothing about VB.
here's the script I use to see if the process (or any specified process) is running.
Assigned>PROCESS,processexists
if>processexists=FALSE
Let>PROCESS=AgentStation.exe
Endif
VBSTART
'returns the number of copies of ProcessName that are running
'will return 0 if ProcessName is not running
Function IsProcessRunning(ProcessName)
Set oWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\.\root\cimv2")
Set colProcessList = oWMIService.ExecQuery ("Select Name from Win32_Process where Name='" & ProcessName & "'")
IsProcessRunning = colProcessList.count
End Function
VBEND
VBEval>IsProcessRunning("%PROCESS%"),result
If result>0
Let>MACRO_RESULT=RUNNING
Macro>%SCRIPT_DIR%\ExpLog.scp /MESSAGE=%PROCESS% running! /STATE=INFO /CALLINGSCRIPT=%SCRIPT_FILE%
Else
Let>MACRO_RESULT=NOT FOUND
Macro>%SCRIPT_DIR%\ExpLog.scp /MESSAGE=%PROCESS% not found! /STATE=INFO /CALLINGSCRIPT=%SCRIPT_FILE%
Endif