Windows 7 64bit start "/wait" not working properly
Posted: 18 May 2010 13:33
Here is an example. This is just a short test I threw together to post. As you can see, the scripts aren't waiting, as all done is echoed before the echos from the other scripts. The output is as follows and the code is below...
***************
starting main
***************
all done
IM HERE IN 1
C:\Users\Administrator\Desktop>
IM HERE IN 2
C:\Users\Administrator\Desktop>
This is test1
this is test2
***************
starting main
***************
all done
IM HERE IN 1
C:\Users\Administrator\Desktop>
IM HERE IN 2
C:\Users\Administrator\Desktop>
Code: Select all
@echo off
echo. ***************
echo. starting main
echo. ***************
start /d "C:\Users\Administrator\Desktop" /wait /b test1.bat
start /d "C:\Users\Administrator\Desktop" /wait /b test2.bat
echo.
echo.
echo. all done
This is test1
Code: Select all
@echo off
Echo. IM HERE IN 1
this is test2
Code: Select all
@echo off
echo.
echo.
Echo. IM HERE IN 2