2

I am trying to configure my Wix Toolkit installer to handle upgrades for my Visual Studio app.

<?xml version="1.0" encoding="UTF-8"?>
<?define ProductVersion = "5.0.0.115"?>
<?define ProductUpgradeCode = "9880b0b8-b3b1-4fa6-b65e-d4ecff430248"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Product Id="*" Name="My Software" Language="1033" Version="$(var.ProductVersion)" Manufacturer="My Company" UpgradeCode="$(var.ProductUpgradeCode)">
  <Package Id="*" InstallerVersion="200" Compressed="yes" InstallScope="perMachine" Comments="My Software version 5 installer" />

  <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed."  />
  <MediaTemplate EmbedCab="yes" />

The problem is that .115 is not actually detected with MajorUpgrade. So for example version 5.0.0.110 is installed, then 5.0.0.115 installer is ran, in the add/remove programs it will list both 5.0.0.110 and 5.0.0.115. If I change the version to 5.0.115.0 everything works correctly.

Is this how the program should work or is this a bug?

Xaphann
  • 3,195
  • 10
  • 42
  • 70

1 Answers1

5

Not an issue with WiX.

This is by design in Windows Installer. Windows Installer will only look at:

major.minor.build

And any 4th field is ignored. See the ProductVersion property documentation for more details.

Nick Whaley
  • 2,729
  • 2
  • 21
  • 28