Wix MajorUpgrade will not detect last position of product version

℡╲_俬逩灬. 提交于 2019-12-24 02:06:52

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/26739648/wix-majorupgrade-will-not-detect-last-position-of-product-version

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!