Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

batch file does not wait for active window to close! 1

Status
Not open for further replies.

ISmonkey

MIS
Sep 6, 2001
62
FR
I noticed that on NT, if i run a batch file that calls an .exe, then the batch file waits until the active window has finished doing whatever it needs to do, and when it completes, the batch file continues running. This is not so on a Windows 98 machine. The batch file calls the .exe and then continues running in the backgroud. Is there any way around this or a patch for Win98 other than a shotgun? (i know i could put a pause in there, but i am trying to make this as automatic as possible)
IS[monkey]
 
If I understood you correctly, you mean that the Windows 98 batch file doesn't close after its finished what its doing. If so, at the end of your batch file, type:

CLS
EXIT


You have to clear the screen before exiting for Windows 98 to actually 'close' the file.

Rgds
 
No, it closes, but on WinNT, the batch file calls another program and then waits on the program to complete before running the rest of the batch. On Win98, the batch file calls the program and then blasts through the rest of the batch while the other program is running. What i need it to do is stop processing the batch file and wait until the other program is finished before completing.
IS[monkey]
 
Any difference if you put the command which should wait in a second batch file which is started by a call command in the first batch file ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top