Set WshShell = WScript.CreateObject("WScript.Shell")
Set locator = CreateObject("WbemScripting.SWbemLocator")
Set service = locator.ConnectServer()
Set props = service.ExecQuery _
("select name, description from Win32_Process where name = 'program.exe'")
num = props.Count
If num > 0 Then
'Program is running
Else
'Program is not running
End If
Set WSHShell = Nothing
Written and compiled by Réal Gagnon ©1998-2005
[ home ]