Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to start an application without waiting in a batch file?

People also ask

How do you run a batch file and wait until it finishes?

Use /WAIT to Wait for a Command to Finish Execution When we start a program in a Batch file using the START command, we can wait until the program is finished by adding /wait to the START command. Even if there are multiple commands, /wait can be used for each process to finish and move to the next one.

How do I get a batch file to start automatically?

The easiest way to run a batch file on a system startup is to place it in the Windows “Startup” folder or drop there a shortcut. Programs placed in this folder are meant to run automatically whenever the computer boots up.

How do I make a batch file run silently?

1] Hidden Start or HStartDrag, and drop the batch file onto the interface. Choose options including hiding console windows, UAC, and so on. You can also test it using test mode. You can also add command-line options if needed.


I'm making a guess here, but your start invocation probably looks like this:

start "\Foo\Bar\Path with spaces in it\program.exe"

This will open a new console window, using “\Foo\Bar\Path with spaces in it\program.exe” as its title.

If you use start with something that is (or needs to be) surrounded by quotes, you need to put empty quotes as the first argument:

start "" "\Foo\Bar\Path with spaces in it\program.exe"

This is because start interprets the first quoted argument it finds as the window title for a new console window.


I used start /b for this instead of just start and it ran without a window for each command, so there was no waiting.


If your exe takes arguments,

start MyApp.exe -arg1 -arg2

If start can't find what it's looking for, it does what you describe.

Since what you're doing should work, it's very likely you're leaving out some quotes (or putting extras in).