0

I use Wix v3.9, and for my product I setup hard-coded Upgrade code, as it's the unique ID to identify a family of a product.

For Product code I use the '*', in order to generate different IDs for different versions.

During testing of installations, I rebuilt my installer several times, so a new ProductCode was generated for each build.

And now, after testing of several installations, I see from 'Control Panel -> Programs' that my product is installed several times. Why?

Andrey G.A
  • 305
  • 4
  • 20
  • From the link which is provided within my question, I learned that if MSI was built with different ProductCode and different PackageCode, the installer would think that it is a NEW product. Is it the answer? WiX doc says that when compiling a product, I should not set Package Code explicitly, so I don't do it yet. – Andrey G.A Feb 15 '16 at 09:01

1 Answers1

2

An MSI is only uninstalled by a newer MSI if the Upgrade table is set to remove the matching UpgradeCode & ProductVersion range. The easiest way to do this in Wix is to use the MajorUpgrade element.

jbudreau
  • 1,287
  • 1
  • 10
  • 22
  • I use this element this way: – Andrey G.A Feb 16 '16 at 07:47
  • 1
    I checked the doc for the [MajorUpgrade](http://wixtoolset.org/documentation/manual/v3/xsd/wix/majorupgrade.html) element - in my case MSI treated versions of my product as two different products because of the fact that _by default the AllowSameVersionUpgrades is No_. So, thanks for the answer! – Andrey G.A Feb 16 '16 at 15:52
  • Then again, wix might ignore it somehow and you'll end up with multiple entries anyway... – Alexander Aug 21 '18 at 21:30