Computing.Net > Forums > Disk Operating System > making batch file wait for one task to finish before another starts

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

making batch file wait for one task to finish before another starts

Reply to Message Icon

Name: Rusty Hilim
Date: December 11, 2000 at 11:15:36 Pacific
Comment:

I am in the process of creating an auto-install procedure for our software. So far I have the batch file (setup.bat) that will call the auto-installation file (acrobat.bat) for the first program and I want it to WAIT until that installation is complete before it calls the second (winzip.bat) and so on.. I have done some research about the PAUSE and CHOICE commands but I would like to stray from hard-coding a certain number of seconds, as the install times will vary from machine to machine. Any assistance would be GREATLY appreciated and I look forward to hearing from you!

Rusty Hilim



Sponsored Link
Ads by Google

Response Number 1
Name: Michael
Date: December 11, 2000 at 12:41:51 Pacific
Reply:

Rusty,

This has been discussed a lot in the forum lately. One way to do it is to make a seperate batch file for each install. Such as the following:

acrobat.bat

@echo off
call c:\temp\acroreadinstall.exe
call winzip.bat

winzip.bat

@echo off
call c:\temp\winzipsetup.exe
call next.bat

So in a sense you would 'string' these batch files along so that each one would call the next.

Another way I thought of doing it would be to see if a the last file in the installation was done installing. I.E.:

@echo off
call acroinstall.bat

:loopacro
If not exist c:\progra~1\acro~1\unwise.exe then goto loopacro

call winzipinstall.bat

:loopwinzip
if not exist c:\progra~1\winzip\unwise.exe then goto loopwinzip

That's it. What's important to know is that you need to somehow isolate the last file being installed by the setup file and check to see if it exists (oftentimes this file will be the last one listed in the installation log of the program). The batch file will loop continiously until it finds that file(I randomnly choose unwise.exe), after which it continues with the batch file.

Hope this helps!
-Michael


0

Response Number 2
Name: Rusty Hilim
Date: December 12, 2000 at 04:50:29 Pacific
Reply:

Thanks for the input...I'll give it a try. I think that just might do it. I'll post my results.

Thanks

Rusty


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: making batch file wait for one task to finish before another starts

Compiling VB programs using a batch file www.computing.net/answers/dos/compiling-vb-programs-using-a-batch-file/5217.html

where can i get a program to make batch files into exe's.please help www.computing.net/answers/dos/where-can-i-get-a-program-to-make-batch-files-into-exesplease-help/2096.html

batch file www.computing.net/answers/dos/batch-file/9877.html