I'm trying to create a very simple Windows-XP batch file:

Program1.exe
Sleep 3
Program2.exe
Sleep 5
Program3.exe
Sleep 11

Of course, I don't want to have to exit each program, before the next 1 starts. The default for batch-files seems to be "stop until the previous program exists".

How do I get this script to run as expected?

Edit: The 3 executables listed above are more like "notepad" type programs. They open and run and don't just "open,run,close".

link|improve this question

0% accept rate
feedback

1 Answer

Use the Start command. Change your batch to this:

Start Program1.exe
Sleep 3
Start Program2.exe
Sleep 5
Start Program3.exe
Sleep 11
link|improve this answer
2  
All that START did was to continue opening more and more DOS windows... and never running any of my .exe programs at all. – Sandy Dec 26 '10 at 20:08
I find that odd. Looking at your edit, are these GUI type programs that don't have a console? If you run notepad.exe from the Console, it will not block the console from continuing. – vcsjones Dec 26 '10 at 21:04
1  
@Sandy: sounds like there is a line break between "Start" and the program name?! or maybe you have " " around the program name? if so, remove them – Felix Dombek Dec 27 '10 at 2:50
Having the same problem and removing the quotes doesn't make it work either. – Chris Charabaruk Dec 28 '10 at 19:13
do these apps open? is it perhaps a path issue? – datatoo Dec 30 '10 at 13:09
feedback

Your Answer

 
or
required, but never shown

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