Page 1 of 1
How to check and close a program
Posted: Fri Nov 28, 2008 11:11 am
by alemrantareq
Hi everybody,
In Process tab of Windows Task Manager, we see the available programs that are running. Suppose I've a program "MyProg.exe" is running in process tab but not in applications tab of Windows Task Manager. I want to make a script for a btn to check whether that program is running or not and close if running. Can it be done by kill command? Please, help......
Posted: Fri Nov 28, 2008 3:37 pm
by Janschenkel
You know, the 'kill' command should only be used as a last resort - as the process that is killed doesn't get a chance to cleanup whatever resources it is locking - and in turn any resources it is connected to may take some time to clear themselves.
So let's see if we can help
prevent this situation from happening. What exactly are the circumstances?
- is this a Revolution application that you build yourself and which has become 'faceless' ?
--> see my reply to your previous question
"Keep the app always active"
- or are you trying to find a way to stop an executable written by someone else ?
Jan Schenkel.
Posted: Sat Nov 29, 2008 7:21 am
by alemrantareq
Hi Janschenkel,
Thanks for your reply. I just trying to find a way to stop an executable from the process tab. Your reply in "Keep the app always active" works nicely. Thanks again for that. Now pls, help me giving its sulotion...
Posted: Tue Dec 02, 2008 6:56 am
by alemrantareq
I'm glad solving my own problem. The "shell" function can be used to kill/close a program from the process tab of windows task manager. For example, in windows XP, a program "MyProg.exe" is running in process tab. To kill that program, the following script can be applied to a button -
Code: Select all
on mouseUp
set the hideconsolewindows to true
get shell("taskkill /f /im MyProg.exe")
end mouseUp
Caution: the "taskkill" command is applicable only for windows xp, for the other versions of windows, the command may be different.
Posted: Tue Dec 02, 2008 11:57 am
by Mark
Thanks,
Mark Stuart.
Best,
Mark Sch
Posted: Tue Dec 02, 2008 4:07 pm
by FourthWorld
Tareq, it seems a good many of your posts here are also submitted to the use-rev list, but when answers are provided there you do not see them.
Is there perhaps an issue with your mail filters preventing you from getting the many timely and helpful replies people have been posting for you on the use-rev list?