Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to end a program at command prompt

Status
Not open for further replies.

furtech

IS-IT--Management
Oct 19, 2003
96
AU
Hello,

I'm looking for a way to end a program in the command line. I don't want to simply kill the process, I want to close it gracefully. Does anyone know of way to do this?

I'd like to Schedule a Task that will close the program each night for me, and then restart it 5 minutes or so later.

Thanks,

---------------------------------------
Matthew Collins
---------------------------------------
 

This is what you need. Even though it seems its killikng the app or program you can add the timeout parameter. which will give the program time to close Gracefully.

then add a 5 minute delay in the batch file to start the program again..

post if that doesnt work !

-
mobajwa

After the game ,the king and the pawn , both go in the same box.
 
mobajwa,

Sweet thanks! I've managed to get it to work.

Only problem is that I've now realised it requires me to click a 'Yes' before actually closing so that idea has gone out the window.

Thanks,

---------------------------------------
Matthew Collins
---------------------------------------
 
Taskkill.exe used without the /F switch passes a normal Windows close command.

Do a taskkill /? to see the syntax.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top