Detect if a program is runningTag(s): WSH VBScript
About cookies on this site
We use cookies to collect and analyze information on site performance and usage,
to provide social media features and to enhance and customize content and advertisements.
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