Computer Hope

Microsoft => Microsoft DOS => Topic started by: yymae on August 02, 2004, 09:29:48 PM

Title: Urgent Help : Batch File Terminate Program
Post by: yymae on August 02, 2004, 09:29:48 PM
Dear all,

I'm newbie in Batch File, I would like to seek assistance here.

The problem is, how to terminate a program(e.g Calc.exe) in batch file and after terminate it, I would like to restart the program again.

How to do it in batch file? please help

Thanks in advance


Cheers,
yymae
Title: Re: Urgent Help : Batch File Terminate Program
Post by: johnwill on August 03, 2004, 09:25:09 AM
AutoIt http://www.autoitscript.com/autoit3/ can solve this problem for you.
Title: Re: Urgent Help : Batch File Terminate Program
Post by: yymae on August 03, 2004, 06:49:53 PM
Besides AutoIt, do you have another solutions?
Title: Re: Urgent Help : Batch File Terminate Program
Post by: johnwill on August 04, 2004, 07:28:41 AM
I don't have another solution, but I never needed another solution.  :)
Title: Re: Urgent Help : Batch File Terminate Program
Post by: yeah right on August 04, 2004, 07:52:43 AM
Depends on the OS you're using.. if you're using winXP, you can use taskkill to kill any process.... for example, to kill calc.exe,

"taskkill /F /IM calc.exe"

"taskkill /?" - if you need more infor on what the F and IM stand for

if you're using an older OS like windows98, you'll have to download a resource from the microsoft website that includes "kill.exe" which will do the same thing as taskkill