DFKA
Posts: 4
Joined: Thu Dec 08, 2016 8:41 am

Supporting two variants of the same application

Hi,

I just wanted to hear what the best practice for the installer configuration is when we have two variants of the same applications.

Only one of the variants can be installed per user.
It should be possible to upgrade an older (or identical, if possible) version of variant 1 with variant 2, and vice versa.

But the end-user should still be able to see which of the variants they are trying to install (in the wizard), and what variant they have installed (in Add/remove programs).


We have tried to simply copy the configuration, change the Product detail name and files for the new variant, regenerate the product and upgrade code, and apply the old upgrade code as an find and remove upgrade action from version 0.0.1 to [ProductVersion].
But this does not seem to do anything (can install the new variant when the old variant is already installed).

Thanks
Catalin
Posts: 6602
Joined: Wed Jun 13, 2018 7:49 am

Re: Supporting two variants of the same application

Hello,

First of all, to make sure I understand your scenario. You have the same application, for which you have created two installation packages, one to be installed per-user and one to be installed per-machine?

If so, as it is stated in our "Install Parameters Page" article:
A per-user installation cannot upgrade a per-machine installation, and a per-machine installation cannot upgrade a per-user installation.
However, for this you can try to use the "Uninstall Previous Versions" custom action. With this custom action you can uninstall the older versions of your product, no matter what Installation Type they use (per-user or per-machine). It can be used as a custom action without sequence or under Wizard Dialogs Stage.

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
DFKA
Posts: 4
Joined: Thu Dec 08, 2016 8:41 am

Re: Supporting two variants of the same application

Hi Catalin,

No, this is in fact two applications, but they share some of their codebase and can’t run side-by-side.
Both should use a per-user installation, but only one variant is allowed to exist for a user at any given time.

We have been using AI for the first variant the last 4 years, with a per-user installation.
Now we want to introduce the second variant, also as a per-user installation.

Thanks
Catalin
Posts: 6602
Joined: Wed Jun 13, 2018 7:49 am

Re: Supporting two variants of the same application

Hello,

Thank you for the explanation. I believe everything is clear now.

So basically, since the two applications can not be installed side-by-side, I'm assuming you want the second "variant" of the setup to upgrade the previous.

A way of achieving this would be to create a new package for the second variant of your application and have both your packages have the same UpgradeCode.

The UpgradeCode is a GUID representing a related set of products. A set of different versions of your application will have the same UpgradeCode. This enables newer versions of your application to search and upgrade previous versions installed on the same computer.

You can change the "UpgradeCode" in the "Product Details" page --> "Product IDs" tab --> "Upgrade Code".

In addition to this, you need to make sure the version of your second setup (second variant) is higher than the version of the older setup (first variant).

This way, when you launch the second variant setup, it will perform a search by the UpgradeCode, it will find the first variant version, will uninstall it and then will install the second variant.

Another approach would be to use the "Upgrades" page, but from what I understand here:
We have tried to simply copy the configuration, change the Product detail name and files for the new variant, regenerate the product and upgrade code, and apply the old upgrade code as an find and remove upgrade action from version 0.0.1 to [ProductVersion].
But this does not seem to do anything (can install the new variant when the old variant is already installed).
this did not work out for you.

To be fully honest with you, I can not say for sure why this happens. In order for me to further investigate this, could you please forward me a test-case which I can follow in order to reproduce the same behavior?


Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”