We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

AndreG
Posts: 57
Joined: Tue Jun 10, 2014 11:41 am

Install conditions for prerequisites

I'm maintaining setup packages for a number of products that all rely on the same base folder structure, but I'm now having a hell of a time trying to keep things updating smoothly.. So here's me hoping someone can help me work this one out.

For the purpose of this example, I'm working with the following 3 packages:
  • AppBase, which installs:
    • Tomcat
    • [other custom files]
  • App1, which installs:
    • App1 as a service
    • [other custom files]
  • App2, which installs:
    • App1 as a service
    • [other custom files]
Both App1 and App2 have AppBase as a pre-install prerequisite. What I'm trying to achieve here is a system that will only install the bundled AppBase if any one of the following points are false:
  • AppBase is not currently installed
  • currently installed AppBase version is lower than the version I specify
For the first point; my AppBase creates a custom registry key storing information that the App1 and App2 setup packages require, so I set a "Registry Key Exists" condition to check for that.
For the second point; I've tried using both the "Product Version (identified by Product Code)" and "Component is installed" options, but I'm having difficulty getting this to work.. I suspect this is because when the product code of AppBase changes, it breaks things down the line when App1 is updated and relies on a newer AppBase.

Please could someone help me figure out how these setup packages should be configured? At the moment the only option I see is storing the AppBase version as a registry entry and reading that at install time, but I'm sure there must be a better way to deal with this.
AndreG
Posts: 57
Joined: Tue Jun 10, 2014 11:41 am

Re: Install conditions for prerequisites

So... Not trying to answer my own question here, but I think I might have gotten around this. Though, I'm not really sure how.. The "other version of this product" error was cleared by uninstalling and restarting the PC, and I got it to update my AppBase from 1.0.0 to 1.0.4 while it was defined as a prerequisite. So far so good.

I'd still like to hear the best way to achieve what I described, or perhaps at least a few different ideas.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Install conditions for prerequisites

Hi,
AppBase is not currently installed
currently installed AppBase version is lower than the version I specify
In order to achieve this, you can create a "Product Version (identified by Upgrade Code)" search and set a minimum version for it. The Upgrade Code does not change and it is the same for all versions of the product.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
AndreG
Posts: 57
Joined: Tue Jun 10, 2014 11:41 am

Re: Install conditions for prerequisites

Eusebiu wrote:The Upgrade Code does not change and it is the same for all versions of the product.
Simple as that hey? That's awesome, thanks Eusebiu. Sounds like that will do the trick. :) I would say perhaps that should be documented somewhere, but perhaps it already is and I simply missed it..

[edit] That worked perfectly, thanks.

For the record, I'm not sure if this is by any specific naming convention or if it's just how AI does it, but by the names I would've assumed the "Product" code would stay unique to the product, while the "Upgrade" code would be unique to that particular upgrade (or version). I think that's where the initial confusion came from.

With the minimum version value, the documentation doesn't mention any sort of supported software versioning schemes, so just to check..
  • Does it split on full stops and compare as numbers? So, 1.10.0 would be considered as newer than 1.1.0?
  • Is there any restriction on the number of version segments used? I myself follow semantic versioning, but not everyone does.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Install conditions for prerequisites

Hi,

You're welcome. I'm glad you got this working.
For the record, I'm not sure if this is by any specific naming convention or if it's just how AI does it, but by the names I would've assumed the "Product" code would stay unique to the product, while the "Upgrade" code would be unique to that particular upgrade (or version). I think that's where the initial confusion came from.
This is the Windows Installer naming convention. The Product Code is unique for each version and the Upgrade Code is represents a related set of products. This was also discussed on the Is it possible to remove the check for different version thread.
Does it split on full stops and compare as numbers? So, 1.10.0 would be considered as newer than 1.1.0?
Yes, in your example "1.10.0" is considered newer than "1.1.0".
Is there any restriction on the number of version segments used? I myself follow semantic versioning, but not everyone does.
Yes, there are restrictions on how the version string should be. You can see the details described in the Product Details Tab article.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
AndreG
Posts: 57
Joined: Tue Jun 10, 2014 11:41 am

Re: Install conditions for prerequisites

Awesome, thanks for the clarification.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Install conditions for prerequisites

You're welcome.

Just let us know anytime you need help.

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

Return to “Building Installers”