nateh
Posts: 3
Joined: Sat Jun 24, 2023 5:13 am

Requiring changing Product Code for package updates

I've looked through dozens of posts related to this topic and see that many people have had issues with this error (product by AI, not Windows):
Another version of this product is already installed. Installation of this version cannot continue. To configure or remove the existing version of this product, use Programs and Features in the Control Panel.


AI support's response in these threads has been that the user needs to change the Product Code and the Upgrade code, with the reasoning being that Windows requires this and doesn't allow two products with the same Product Code to be installed. But this isn't a new product, it's merely an update of the same product with minor changes and patches.

We've never had trouble with this until AI, and the more I research, the more I discover that AI's requirement isn't correct. You should never, ever change the product code unless you consider the new version to warrant considering it a different product from the last product code (like Microsoft Word 2003 and 2007), and you shouldn't change the Upgrade Code for minor changes or patches. And I'm certainly not installing a new product, I'm installing an update; the name is exactly the same, and I only changed the build or minor version (3rd and 4th segments) in my tests.

Furthermore, my company has gone from using two different major installer programs for over 10 years to now using Advanced Installer in the past couple of months. With the previous programs, after setting up the installer for each product with a unique Product Code and Upgrade Code, we never once had to touch these GUIDs again. This includes multiple products with many updates across multiple years. With past installer programs, all we do is provide the new files to install, update the version number (which never yields a warning about changing the GUID in these programs), and build, and the installer runs perfectly and overwrites the files regardless of the product and upgrade codes not changing. Running the installer for an older version or newer version, or the same version, never required uninstalling the product for the installation to proceed, either.

Why can't Advanced Installer simply just overwrite the files for a product when we just need to release bug fixes via the installer? Is the intended use of AI purely for initial setup of a product, and not for updating a product with future installer builds? Our current method has us doing full reinstalls of the product for each update for our own reasons. Surely there's a way around this, because it isn't normal or correct to have to change these GUIDs just because the version changed.
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: Requiring changing Product Code for package updates

Hello and welcome to our forums,

First of all, please note that Advanced Installer is built upon the Windows Installer technology, in which there is a set of rules which has to be accepted.

One of these rules is that two products having the same ProductCode can not be installed on the same machine because that's how the OS is differentiating between the two apps.

Similarly, the UpgradeCode should stay the same so a higher versioned app can detect and upgrade a lower one.

This is written in our User Guide:

Product Identification (ProductCode and UpgradeCode)

as well as on Microsoft's documentation:

Product Codes
The product code is a GUID that is the principal identification of an application or product. For more information, see the ProductCode property. If significant changes are made to a product then the product code should also be changed to reflect this.
What it means by "significant changes" is the two "upgrade" options:

- major upgrade --> this works by detecting the previous version, uninstalling it and then installing the newer version

One big advantage here is the fact that you can install the setup either as a first install and as an upgrade as well.

One disadvantage would be the size.

- patch --> the patch only contains the diff between two packages (say v1.0.0 and v1.0.1). The patch works by basically merging to the already installed version v1.0.0 and transforming it in v1.0.1.

The ProductCode must stay the same between the two versions because that's the only way in which the Windows Installer can detect the product to which the patch should be applied.

One advantage of the patch would be its size.

One disadvantage would be that it can only be installed if previous version was already installed, otherwise it will fail.

When you change the version in Advanced Installer, you are being asked if you'd like to change the ProductCode. You can simply select "Yes" here and everything will work.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
nateh
Posts: 3
Joined: Sat Jun 24, 2023 5:13 am

Re: Requiring changing Product Code for package updates

Catalin wrote: Tue Jun 27, 2023 3:29 pm Hello and welcome to our forums,

First of all, please note that Advanced Installer is built upon the Windows Installer technology, in which there is a set of rules which has to be accepted.

One of these rules is that two products having the same ProductCode can not be installed on the same machine because that's how the OS is differentiating between the two apps.

Similarly, the UpgradeCode should stay the same so a higher versioned app can detect and upgrade a lower one.

This is written in our User Guide:

Product Identification (ProductCode and UpgradeCode)

as well as on Microsoft's documentation:

Product Codes
The product code is a GUID that is the principal identification of an application or product. For more information, see the ProductCode property. If significant changes are made to a product then the product code should also be changed to reflect this.
What it means by "significant changes" is the two "upgrade" options:

- major upgrade --> this works by detecting the previous version, uninstalling it and then installing the newer version

One big advantage here is the fact that you can install the setup either as a first install and as an upgrade as well.

One disadvantage would be the size.

- patch --> the patch only contains the diff between two packages (say v1.0.0 and v1.0.1). The patch works by basically merging to the already installed version v1.0.0 and transforming it in v1.0.1.

The ProductCode must stay the same between the two versions because that's the only way in which the Windows Installer can detect the product to which the patch should be applied.

One advantage of the patch would be its size.

One disadvantage would be that it can only be installed if previous version was already installed, otherwise it will fail.

When you change the version in Advanced Installer, you are being asked if you'd like to change the ProductCode. You can simply select "Yes" here and everything will work.

Best regards,
Catalin
Suggesting that I say yes to changing the Product Code breaks the rules, though, because that suggests I should treat our update as a new product, but it's the same exact product; no major changes. We just want to install the product over the previous version, and that's it.

To reiterate, InnoSetup (free to use) and SetupBuilder figured out how to allow the installer to overwrite files without a single issue. I'd assume they just recognized that the Product Code that was attempting to be registered already existed and skipped that step, and then allowed the installer to continue.

It isn't productive to force customers to pick between a full installer for a new installation, or a patch installer for updates; this adds unnecessary strain on distribution instead of allowing the customer to decide how to go about using Advanced Installer. I agree that Windows Installer cannot have two products with the same Product Code, but you must recognize that this is the same product that future updates are installing.

Surely there's a way for you to skip registering the already used GUID, which clearly would have to be unique since there's only 1 in 340 undecilllion (or 340 billion billion billion billion) chance of the GUID being used by another company out in the world.
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: Requiring changing Product Code for package updates

Hello,

Both InnoSetup and SetupBuilder are not Windows Installer based.
Screenshot_141.png
Screenshot_141.png (18 KiB) Viewed 8406 times

This is why you do not see the same behavior between those and Advanced Installer or other Windows Installer based package authoring tools.

Thank you for your understanding and please let me know if there's anything else I could help you with!

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

Return to “Building Installers”