aldenlong
Posts: 23
Joined: Mon Oct 01, 2012 8:58 pm

Updating a prerequisite installation

Tue May 21, 2013 5:07 pm

Sorry if you have already covered this, but the forum search will not permit "update" "prerequite" "conditional" or any of the words that might link to this topic. I need to install a custom software package as a prerequisite, but only on the conditions that (1) the target computer already has a version of this software installed, and (2) the installed version is older than the one included in the installation package. The custom prerequite choices do not permits, as prerequisites are installed on conditions being either all false or at least one false. I need to install on both true. Any suggestions?

Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: Updating a prerequisite installation

Wed May 22, 2013 9:40 am

Hello,

Please use the upper right search, the “Google Custom Search”.

In order to achieve that, on the “Install Conditions” tab from the “Prerequisites” page, after you checked the “Install prerequisite based on conditions”, you will have to define two install conditions.

One of them can be with the “Registry value does not exist” - criteria. (If the software is already installed on the target machine then the evaluation of this condition should be false).

The other criteria can be “Registry value containing a version” and in the “Required Versions” set your version in the “Minimum” field. (The prerequisite package will be installed only if on the target computer the version of the software is lower then yours from the prerequisite package).

In order to install the prerequisite package you check the “Install only if all conditions are false”.

Also you can evaluate your condition using the “Evaluate” button.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

aldenlong
Posts: 23
Joined: Mon Oct 01, 2012 8:58 pm

Re: Updating a prerequisite installation

Wed May 22, 2013 8:49 pm

I considered a recipe entry as a marker that indicates whether or not the software is resident on the machine, but the issue is that existing installations will not have that registry entry, so they will not identify as needing an upgrade. It seems the only way I can accomplish this is to write my own custom executable that returns "false" if the target file is found on the machine. That way I can combine this false test with the version update test. Seems a bit kludgy, but it works. You might consider adding AND conditionals or a predefined "file not found" test (which returns "false" if the file is found!).

Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: Updating a prerequisite installation

Thu May 23, 2013 10:59 am

Hello,
I considered a recipe entry as a marker that indicates whether or not the software is resident on the machine, but the issue is that existing installations will not have that registry entry, so they will not identify as needing an upgrade. It seems the only way I can accomplish this is to write my own custom executable that returns "false" if the target file is found on the machine. That way I can combine this false test with the version update test. Seems a bit kludgy, but it works.
Indeed, in this case your approach is the right one.
You might consider adding AND conditionals or a predefined "file not found" test (which returns "false" if the file is found!).
Maybe we will consider adding this improvement in a future version of Advanced Installer. Thank you for your suggestion.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”