Download and install an additional application using Install4J

I use Install4J to build the installation for my application (let me call it MainApp) and it works fine.

To be able to use MainApp, you also need to install my second application (you can call this SecondApp).

My question is that. Is there any way to get Install4J for the first installation of MainApp, and as a last step in the installation, download SecondApp (exe file located on the web server) and execute it?

+6
source share
1 answer

You can do this by adding two actions to the Installation screen:

  • Download File to download the SecondApp installer

  • "Run executable file or batch file" to execute it. Select the Wait For Completion property to wait for the installation to complete.

To improve user feedback, add the following two steps before the "Run executable or batch file" action:

  • "Set progress bar" with "Change Type" set to "Set to Undefined"

  • The action "Install messages" with the selected "Use status" and "Status message" is set to "Install a second application ..."

If you do not want to use the "SecondApp" installer executable, use ${installer:sys.workingDir}/secondapp.exe to download it to the installer’s temporary directory. It will be deleted automatically when you exit the setup program.

+6
source

Source: https://habr.com/ru/post/902191/


All Articles