Check if a program is runningTag(s): WinAPI/Registry
OleObject locator,service,props
String ls_query = &
'select name , description from Win32_Process where name = "textpad.exe"'
int num, ret, i
locator = CREATE OleObject
ret = locator.ConnectToNewObject("WbemScripting.SWbemLocator");
service = locator.ConnectServer();
props = service.ExecQuery(ls_query);
num = props.count()
IF num > 0 THEN
MessageBox("Process","textpad.exe is running")
ELSE
Messagebox("Process","textpad.exe is NOT running")
END IF
See this related howto
mail_outline
Send comment, question or suggestion to howto@rgagnon.com
Send comment, question or suggestion to howto@rgagnon.com