I hope you're all doing well.
So, we have an installer built with Advanced Installer. The installer consists of:
1. Main application;
2. Two .NET runtimes;
3. Nine Feature-based secondary applications (Nine full installers built with Advanced Installer as well).
Some important additional information about our .aip project
We're currently using Advanced Installer version 20.7.1 and are unable to upgrade at the moment.
We are using this option: Prerequisites > Global Prerequisites Options > Check launch conditions before searching for prerequisites so that the launch conditions are before installing the .NET prerequisites.
Our installer has multi-language support.
Now, we want to change the installation process:
New installation rules
The installer must block fresh installations (i.e., when no previous version is installed on the computer) if:
- An specific X software is found, and its version is below N.
- That specific X software is not installed, or;
- If the version is not found, or;
- Its version is above N.
- The update must always proceed, regardless of whether the specific X software is installed or its version.
The approach we used to determine if the software is installed is:
1. A search to retrieve a raw value of the registry from key: HKEY_LOCAL_MACHINE\SOFTWARE\My Company\Team\Product\Version. The value is taken from 'Version';
2. A launch condition to verify if the value is below N.
On Launch Conditions, we tried those custom conditions:
NOT OTHER_SOFTWARE_VERSION OR OTHER_SOFTWARE_VERSION > "x.x.x" OR OLDPRODUCTS
NOT OLDPRODUCTS AND (NOT OTHER_SOFTWARE_VERSION OR OTHER_SOFTWARE_VERSION > "x.x.x")
NOT Installed AND (NOT OTHER_SOFTWARE_VERSION OR OTHER_SOFTWARE_VERSION > "x.x.x")
Both approaches work well and block a new installation when Y version is below N, when Y version is above N or when Y is not present, but when we update the application (silently), the launch condition is triggered, when we wanted to not be triggered, blocking the silently update and killing our service.
Looking for a solution
In my searches, I found some users saying that sometimes, some properties (like Installing, OLDPRODUCTS and etc.) aren't populated in time. I have tested myself and displayed Installed, OLDPRODUCTS and UPGRADINGPRODUCTCODE (this one just to check the test) on the installation logs and all of them were empty. This may cause the condition to be triggered on the update or are we misunderstanding the process?
With that, I ask you: is that the best approach for this situation?
If yes: how can we make it so that it ignore that custom condition when the software is updating itself silently?
If not: which approach should we take?
Thank you for now, any more information you need, just ask and we will provide as soon as possible.
Edit: We also tried a Custom Action approach, but we couldn't get it to work.