It would be helpful to see the existing script or to know what its written in.
The WAIT option is a good one for making a dos script wait until an action is completed ie. untill your programme has finished.
You could also have a loop checking if the process has completed before continuing, or maybe looping until your output file is created.
Or a VB command to run the .exe and not continue untill the .exe has completed. To do this you could do something like;
'*************************
Set objShell = WScript.CreateObject("WSCr
set filesys=CreateObject("Scri
objShell.run "notepad.exe", 1, true
If filesys.FileExists("d:\bak
filesys.MoveFile "d:\bak\1.xls", "d:\bak\bak\"
End If
'*************************
The above will run notepad.exe, then wait for Notepad.exe to close. When it does it moves the file 1.xls from d:\bak to d:\bak\bak\
Hope that helps
Main Topics
Browse All Topics





by: SteveGTRPosted on 2007-07-13 at 10:37:18ID: 19482857
I'd recommend calling the executable program using the start command with the WAIT option:
start /WAIT program.exe