Despite what the documentation says, I cannot get start /wait to work with /b, despite stabbing in the dark trying nearly every possible combination of inputs I can imagine. My command path does not contain spaces, so this is not a quoting issue.
This works:
start /wait <path-to-.exe> <param1> <param2> ...This does NOT work:
start /wait **/b** <path-to-.exe> <param1> <param2> ...The program I'm trying to run is a cli/console application, so this caveat (from start /help) shouldn't apply:
2When executing an application that is a 32-bit GUI application, CMD.EXE does not wait for the application to terminate before returning to the command prompt. This new behavior does NOT occur if executing within a command script.
1 Answer
This appears to be a bug in the implementation of the start command. There's a simple workaround:
start /wait /b mycommanddoesn't work (the /wait argument is ignored) but
start /b /wait mycommanddoes. (Note that in this simple example you might as well just run mycommand directly, but this workaround may be useful if you want use options such as /low or /i.)
8