A: The script below checks for a given process and reports if it’s running by scanning through all running processes.

Replace the procName “winword.exe” with the image you wish to check for and replace the logic if the process is found with your own requirements.

set objWMIService = GetObject ("winmgmts:")
foundProc = False
procName = "winword.exe"
procNameFriend = "Word"

for each Process in objWMIService.InstancesOf ("Win32_Process")
    If StrComp(Process.Name,procName,vbTextCompare) = 0 then
        foundProc = true
    End If
Next
If foundProc = True Then
    WScript.Echo "Found Process"
End If