开发者

WiX3 major upgrade not working

开发者 https://www.devze.com 2023-01-18 15:32 出处:网络
I have a major upgrade that I am trying to do, but it just doesn\'t work. It simply installs the new program along side the old one. They are in different directories (as I changed the directory struc

I have a major upgrade that I am trying to do, but it just doesn't work. It simply installs the new program along side the old one. They are in different directories (as I changed the directory structure with the new version) so there are no conflicts, but the old one NEEDS to be erased in order for my product to function properly.

<Property Id="UPGRADE_NEEDED" Secure="yes" />
<Property Id="SAME_OR_NEWER_VERSION" Secure="yes" />
<InstallExecuteSequence>
    <RemoveExistingProducts After="InstallFinalize" />
</InstallExecuteSequence>
<Upgrade Id="{PUT-YOUR-GUID-HERE}">
    <UpgradeVersion Minimum="5.1.3" OnlyDetect="yes" IncludeMinimum="yes" Property="SAME_OR_NEWER_VERSION" />
    <UpgradeVersion Minimum="5.1" Maximum="5.1.3" Language="1033" Property="UPGRADE_NEEDED" MigrateFeatures="yes"开发者_StackOverflow社区 IncludeMinimum="yes" />

That is my upgrade elements (with GUID removed of course). If anyone can find where the problem lies I would greatly appreciate it.


There are some general rules for an upgrade to be working:

  1. Old and new products must have identical UpgradeCode values and different ProductCode values.

  2. Old and new products must have identical values for InstallAllUsers [i.e. a per-machine installation cannot upgrade a per-user installation and vice-versa.]

  3. New product's setup Version (the setup project, nothing to do with file versions) must be higher.

  4. All setup versions (again, not file versions) must be 1.0 or greater.

Further details how to correctly implement an upgrade using WiX can be found in this thread:

How to implement WiX installer upgrade?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号