start /wait does not wait for process to finish - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

start /wait does not wait for process to finish

nirvannirvan Posts: 6Member
I am having a batch file which installs mysql and other addon's. I start the installation with start /wait command for MYSQL.exe as given below.

start /wait $INSTALL_PATH/Temp1/Server/MYSQL.exe
echo done

The problem is that the processing does not wait for the MYSQL.exe to complete. So in the above code the line "echo done" gets executed before the line "start /wait $INSTALL_PATH/Temp1/Server/MYSQL.exe" has finished installation of MYSQL.

regards,
nirvan.

Comments

  • DaiMitnickDaiMitnick Posts: 77Member
    I know that in XP (not sure about vista) DOS does not support the wait function on 32-bit win apps, only on 16-bit, so you'll have to find a workaround. My suggestion would be to create a loop to see if any new files are created after running MySQL and use that as the trigger, or if running MySQL uses up specific ports you could use the net send command to see once they have finished using them. Hopefully you can think of a better method. Hope this helps, Dai.


    ------------------------------------------
    Do or do not, there is no try. |
    ------------------------------------------
Sign In or Register to comment.