Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to create a batch file that when ran it will exit 3 separate applications, wait a few seconds and then relaunch the same applications. Can someone assist me with some resources for accomplishing this? Thank you.

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

This should do it

taskkill /im yourprogram.exe /f
taskkill /im yourotherprogram.exe /f
taskkill /im yourotherotherprogram.exe /f
timeout /t secondstotimeout
start yourprogram
start yourotherprogram
start yourotherotherprogram
share|improve this answer
    
When I start the programs again they need to be links to shortcuts on the desktop because they have startup parameters on them. How do I get them to start? –  cyborgcommando0 Jul 19 '12 at 16:07
    
Just do start yourprogramsshortcut.lnk –  Bali C Jul 19 '12 at 16:09
    
Thanks @bali! I was able to use yourprogramsshortcut.lnk for one of them. The other I had to use start "" "c:\filepath\file.exe" and the other start "random title" "otherprogramshortcut.lnk" and it worked fine! Thanks for the help! –  cyborgcommando0 Jul 19 '12 at 17:41
1  
Great, I'm glad you got it working! :) –  Bali C Jul 19 '12 at 19:06
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.