Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Download and install additional application with Install4J

Tags:

install4j

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?

like image 489
ulejon Avatar asked Nov 23 '11 11:11

ulejon


1 Answers

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.

like image 84
Ingo Kegel Avatar answered Sep 21 '22 14:09

Ingo Kegel