ajon13
Posts: 10
Joined: Fri May 17, 2013 10:05 pm

prerequisite or chained installation or install new version

I have a Java license, which I use to generate an msi file. Inside the msi file I have the binaries of another non-java program. I call these binaries from my Java application.

My problem is these binaries are huge compared to my program and they never change, and everytime I update the software all of the clients have to download a huge file.

The way I see it I have 3 options:

1) Use a Prerequisite step to install the additional binaries (only if changed).
2) Use a Chained package to install the additional binaries (only if changed).
3) keep doing what I am doing but use the Install new version first then uninstall old version feature.

Any suggestions? If I should do one of these three, what are the steps I need to do? I'm a very novice user at this point, but trying to learn.
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: prerequisite or chained installation or install new vers

Hi and welcome to Advanced Installer forums.

Thank you for your interest in Advanced Installer.

In order to achieve what you want you can follow the steps below:
- create a simple MSI package that contains only the binaries of the non-java program (i.e. name it "Binaries.msi")
- go in the Prerequisites page of the main package project and using the "New URL Prerequisite" toolbar button add the URL to the "Binaries.msi" package, then click [OK]. In this case the "Binaries.msi" package will be added as a prerequisite and it will be downloaded from the server at the installation time (you can move it in the "Feature-based" folder or you can let it in the "Pre-install" folder if you wish)
- go in the "Install Conditions" tab of this prerequisite and check the "Install prerequisite based on conditions" option
- then using the [New...] button create a "Product Version (identify by Product Code)" search and in the "Product Code" field write the product code of the "Binaries.msi" package (remove the predefined "File Version" search)
- go in the Custom Actions page, add a "Launch file" custom action and place it after the "Finish Dialogs Stage"
- configure your custom action like in the example below:
  • File To Launch: msiexec.exe
    Command Line: /x <and the product code of the "Binaries.msi" package>
    (to uninstall the "Binaries.msi" package)
    Execution Options: uncheck all options
    Dialogs Stage Condition: check only "Uninstall"
    (the "Binaries.msi" package will be uninstalled only when the main package is completely uninstalled, not on upgrade of the main package)
- build and run the project

Let us know if this helped, otherwise give us more details about your scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ajon13
Posts: 10
Joined: Fri May 17, 2013 10:05 pm

Re: prerequisite or chained installation or install new vers

This is most helpful, and seems to be exactly what I am looking for.

However, what I am running into is when I run my installer the prerequisite is not running. I don't think it is downloading either. Do you have any ideas or suggestions as to why this might be?

Thank you for your time!

Since I think it will be helpful:

under "Prerequisites" I right clicked on "Pre-install" then "New URL Prerequisite"
Properties tab:
Display --> Name: Required Binaries
Display --> Minimum version: 1.0.0
everything else is unchecked

Setup Files tab:
Location --> Download single file from URL (selected)
Main Setup File --> URL: https://www.url.to.msi.file
everthing else is blank or unchecked

Install Conditions tab:
Install Conditions --> Install prerequisite based on conditions (Selected)
1 criteria:
Product Version (identify by Product Code) Search String {product id}
Install Conditions --> install only if all conditions are false (selected)
everything else is unchecked or blank.

Then under Custom Actions:
Added LaunchFile under Finish Dialogs Stage:
Properties --> File To Launch: msiexec.exe
Properties --> command Line: /x 0A0A000A-0A00-ASDF-ASDF-QWERSADFGSDF <-- Using my actual product id.
Execution Time --> Immediately (selected)
Dialogs Stage Condition --> uninstall (selected)
everything else is unchecked or blank
ajon13
Posts: 10
Joined: Fri May 17, 2013 10:05 pm

Re: prerequisite or chained installation or install new vers

Update: When my main project is an exe with the above settings it seems to be working.

However I can't get it to work with a .msi file.
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: prerequisite or chained installation or install new vers

Hi,

When a prerequisite is added in the "Pre-install" folder the main package is automatically turned to an EXE package. If you want to have an MSI package you can add the prerequisite in the "Feature-based" folder, then go in the Media page of the main project and select an MSI package type.

Let us know if this helped.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ajon13
Posts: 10
Joined: Fri May 17, 2013 10:05 pm

Re: prerequisite or chained installation or install new vers

It Worked. Thanks a lot.
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: prerequisite or chained installation or install new vers

You're welcome. I'm glad you got this working.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”