i have a sequence of 3 programs that have to be launched one after another. I found on the web something like that wich is exactly what i whant to do :
start /wait /b First.exe
start /wait /b Second.exe
start /wait /b Third.exe
My problem is that i have 1000 sequence to launch…
So i tried
start "exemple" "start /wait /b First.exe
start /wait /b Second.exe
start /wait /b Third.exe"
start "exemple2" "start /wait /b First.exe
start /wait /b Second.exe
start /wait /b Third.exe"
I also tried
start /b First1.exe
start /wait /b Second1.exe
start /wait /b Third1.exe
start /b First2.exe
start /wait /b Second2.exe
start /wait /b Third2.exe
This is not working too…
So i do not know how to do it.
any idea?
thx 🙂
[EDIT ]
Let’s try to make it more clear
start "exemple" "start /wait /b First.exe
start /wait /b Second.exe
start /wait /b Third.exe"
start "exemple2" "start /wait /b First.exe
start /wait /b Second.exe
start /wait /b Third.exe"
This failed because the 2nd start is not recognized, it says that windows can’t find ‘start /wait /b First.exe’
start /b First1.exe
start /wait /b Second1.exe
start /wait /b Third1.exe
start /b First2.exe
start /wait /b Second2.exe
start /wait /b Third2.exe
This failed because the order is
First1.exe and Second1.exe are launched.
Then the computer wait the end of Second1.exe to launch First2.exe and Second2.exe …
The order i would like is
The computer launch First1.exe & First2.exe
Second1.exe is launched when First1.exe finished and Second2.exe is launched when First2.exe finished.
I would like to avoid using one .cmd per execution (this would be my fail solution).
I wish i’m more clear this time!
You will need one instance of cmd.exe for each sequence, in addition to the main instance. The operating system has no built-in support for sequencing processes, and cmd.exe doesn’t support threading in command files.
You can do it like this:
The only way to avoid the (fairly modest) overhead of the extra instances of cmd.exe would be to write a solution in a real programming language rather than as a batch file.
You may also want to consider whether this is really want you want to do. Windows doesn’t typically perform very well when hundreds of processes are running simultaneously.