How to run multiple setups in one setup exe

2019-07-27 22:42发布

问题:

I got two setup exe files that needs to be installed in correct order; setup1.exe first, then setup2.exe. In addition, I also have to run a batch script after setup2.exe is finished.

How can I do this the easiest way?

回答1:

I'm not sure what level of expertise you're at, so I'm aiming low.

Type the following into Notepad:

@echo off
setup1.exe
setup2.exe
call "batch script.bat"

Then Click File -> Save As
Type %userprofile%\Desktop\MainSetup.bat
Click -> OK

Next Click -> Start
Type CMD.EXE -> Press [ENTER]
Wait for the black command prompt to appear.
Type CD %userprofile%\Desktop -> Press [ENTER]
Type DIR MainSetup.* -> Press [ENTER]

If you see a file named MainSetup.bat.txt:
Type REN MainSetup.bat.txt MainSetup.bat -> Press [ENTER]

Now MainSetup.bat is ready to be moved to where ever you want it. If setup1.exe setup2.exe and batch script.bat are in the PATH, then you can use it anywhere, including your Desktop (Where it is right now). If not then you will either want to place MainSetup.bat in the same directory as the other three, or change the MainSetup.bat to reflect their locations. (In Example, change setup1.exe to something like this "C:\Program Files\Program\setup1.exe")