Check a process is running or not
Posted: Sun Jan 09, 2011 7:31 am
Hi everybody, I've got a vbscript for checking whether a process is running or not. I'm going to check whether "notepad.exe" is running or not. Here is the vbscript -
It works perfect in .vbs mode. Then I've put the above in a btn's custom property. I've just modified this code a little so that rev can work with it. The modified part is -
Then made the btn script like this -
It says
As I've no knowledge on vbscript, somebody pls help me correcting the script. I'm waiting for the sound reply & to complete my pending project. Replies r most appreciated. 
Code: Select all
Set WshShell = WScript.CreateObject ("WScript.Shell")
Set colProcessList = GetObject("Winmgmts:").ExecQuery ("Select * from Win32_Process")
For Each objProcess in colProcessList
If objProcess.name = "notepad.exe" then
vFound = True
End if
Next
If vFound then
msgbox("found")
Else
msgbox("not found")
End If
Code: Select all
If vFound then
result = "Found"
Else
result = "Not Found"
End If
Code: Select all
on mouseUp
do the cVBScript of me as "vbscript"
put the result into tResult
answer tResult
end mouseUp
Code: Select all
execution error
