mirror of
https://github.com/sbrow/ps.git
synced 2025-12-29 18:47:38 -05:00
13 lines
428 B
Plaintext
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")
|