Say, if I have
- foo.exe
- bar.exe
- baz.exe
How do I run all of them from a batch file asynchronously, i.e. without waiting for the previous program to stop?
Say, if I have
How do I run all of them from a batch file asynchronously, i.e. without waiting for the previous program to stop?
Using START
command to run each program should get you what you need.
Every START
invocation runs the command given in its parameter and returns immediately, unless executed with a /WAIT
switch.
That applies to command-line apps. Apps without command line return immediately anyway, so to be sure, if you want to run all asynchronously, use START
.
Create a batch file with the following lines:
start foo.exe
start bar.exe
start baz.exe
The start command runs your command in a new window, so all 3 commands would run asynchronously.
You can use the start command to spawn background processes without launching new windows:
start /b foo.exe
The new process will not be interruptable with CTRL-C; you can kill it only with CTRL-BREAK (or by closing the window, or via Task Manager.)
wow, that helped alot in starting "Teamspeak" and "TeamspeakNoise" parallel.