2021年1月19日星期二

WIX: Prevent only CERTAIN older versions from being updated

We have some product, that uses WIX as installer technology. Upgrade handling in the installer is handled by he MajorUpgrade element

<Wix>    <Product Id="..." Name="..." Language="..."      Version="..." Manufacturer="..."      UpgradeCode="...">  ...        <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" AllowSameVersionUpgrades="yes" />    </Product>  </Wix>  

As you can see, we supported upgrades from all older version until now, however we have to change this a bit, so that only versions newer than a certain version can be upgraded, while older versions receive an error message and upgrade fails.

From what I've researched, this should be doable with the Upgrade element (as described in https://www.firegiant.com/wix/tutorial/upgrades-and-modularization/checking-for-oldies/)

My question now:

  • is it possible/recommended to mix MajorUpgrade and Upgrade elements?
  • is there a better way for achieving this?
https://stackoverflow.com/questions/65787694/wix-prevent-only-certain-older-versions-from-being-updated January 19, 2021 at 04:20PM

没有评论:

发表评论