Random Stuff of Randomness

Simon's

Wix Upgrade Code

Building a WiX msi installer resulted in duplicate installation when a new version was installed. This was strange, then I have made sure to provide an upgrade code like so:

1<Product Id="*"
2    Language="1033"
3    UpgradeCode="DB9B0021-ED5D-4E9F-B17F-34A72D2D9689"
4    Manufacturer="[Copy Right Info]"
5    Name="[Product Name]"
6    Version="1.0.1">

The problem was happening after I have added <ServiceInstall ...> to my primary component.

The solution

adding MajorUpgrade to the Product did the trick:

1<MajorUpgrade
2    Schedule="afterInstallInitialize"
3    DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit." />