I just start to learn how to build batch file. ( on the windows 7 environment)
I want to build the batch file which is able to run .exe files sequentially .
Run batch files sequentially
I was trying to apply above idea but I am not really sure how to apply it
For example, there are three file on the D:/
In "D:/" there are three .exe files.
And I would like to build batch file which is running three exe files sequentially
Possible scenario is..
- Run batch file
- Run MyDriver.exe
- MyDriver file's install GUI pops up and then user start to install Mydriver
- Done with MyDriver.exe
- Run YouDriver.exe
- YouDirver file's install GUI pops up and then user start to install YouDriver
- Done with YouDriver.exe
- Run MySoftware.exe
- MySofrware install interface pops up and then user start to install MySoftware
- Done exit batch file.
I am not really sure if batch files can do it or not...
if it is impossible , is there any other options to build it ???
thanks
You actually don't need to do anything special to make this happen; batch files are synchronous by default, so execution of the batch file will pause when an executable is launched, and resume when it exits. Something as simple as this should do:
@echo off
REM "@echo off" prevents each line from being printed before execution,
REM and is optional
REM "REM" introduces a comment line
D:\MyDriver.exe
D:\YouDriver.exe
D:\MySoftware.exe
Of course, if you're interested in checking the return values of the programs, to see whether they succeeded or failed to install (assuming the installer provides that information), then things become slightly more complicated; if that's what you need, mention it in a comment, and I'll expand my answer accordingly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With