I'm using Install4J to build an installation for my application (lets call it MainApp), and it work great.
To be able to use MainApp, you also need to install my second application (lets call this one SecondApp).
My question is this. Is there a way to get Install4J to first install MainApp, and as the last step in the installation download SecondApp (an exe file located on a webserver) and execute it?
You can do that by adding two actions to the "Installation" screen:
"Download file" action, for downloading the "SecondApp" installer
"Run executable or batch file" action, for executing it. Select the "Wait for termination" property to wait for the installer to complete.
To improve user feedback add the following two actions to before the "Run executable or batch file" action:
"Set the progress bar" action with "Type of change" set to "Set to indeterminate state"
"Set messages" action with "Use status" selected and "Status message" set to "Installing second app ..."
If you do not want to keep the "SecondApp" installer executable, use ${installer:sys.workingDir}/secondapp.exe
to download it to the temporary directory of the installer. It will be deleted automatically when the installer exits.
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