mirror of
https://github.com/sbrow/ps.git
synced 2026-02-28 03:01:43 -05:00
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.
This commit is contained in:
12
scripts/PsIsOpen.vbs
Normal file
12
scripts/PsIsOpen.vbs
Normal file
@@ -0,0 +1,12 @@
|
||||
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")
|
||||
Reference in New Issue
Block a user