Files
ps/scripts/PsIsOpen.vbs
Unknown 4bf7eca6b0 Minor Improvements
* Made Refresh() more robust - when an error is encountered, the layer(set) is reloaded automatically.
* JS errors are now output to console instead of alerts.
2018-04-04 15:14:59 -04:00

13 lines
428 B
Plaintext

Function IsProcessRunning( strComputer, strProcess )
Dim Process, strObject
IsProcessRunning = False
strObject = "winmgmts://" & strComputer
For Each Process in GetObject( strObject ).InstancesOf( "win32_process" )
If UCase( Process.name ) = UCase( strProcess ) Then
IsProcessRunning = True
Exit Function
End If
Next
End Function
wScript.Echo IsProcessRunning(".", "Photoshop.exe")