Windows start /wait /b NOT working

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:

When 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.

2

1 Answer

This appears to be a bug in the implementation of the start command. There's a simple workaround:

start /wait /b mycommand

doesn't work (the /wait argument is ignored) but

start /b /wait mycommand

does. (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

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like