"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."
You need to create a small C app that monitors the thread of the process you are running. If you don't know C, then do the following:
1. Get the Windows Platform SDK. The C# compiler comes with it.
2. Compile the source found in
this thread.
then call the new executable using your app as the -f parameter, as specified in the syntax I posted in the above thread.