Windows 7 64bit start "/wait" not working properly

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
for(im stuck)
Posts: 3
Joined: 15 Apr 2010 08:23

Windows 7 64bit start "/wait" not working properly

#1 Post by for(im stuck) » 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>


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

for(im stuck)
Posts: 3
Joined: 15 Apr 2010 08:23

Re: Windows 7 64bit start "/wait" not working properly

#2 Post by for(im stuck) » 18 May 2010 14:52

I decided just to use the call function instead rather than start. It seems to work fine.

avery_larry
Expert
Posts: 391
Joined: 19 Mar 2009 08:47
Location: Iowa

Re: Windows 7 64bit start "/wait" not working properly

#3 Post by avery_larry » 21 May 2010 08:42

When using start with batch files, I always:

start "" /wait cmd /c "batchfile.cmd"

. . .

Post Reply