使用主要版本零升级 WiX 生成的包 [英] Upgrading a WiX generated package with major version zero

查看:18
本文介绍了使用主要版本零升级 WiX 生成的包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我发布了一个版本为 0.8.3 的包,我现在准备发布一个新包.然而,我正在努力实现 Major Upgrade/Upgrade.似乎从未填充过 WIX_UPGRADE_DETECTED 变量.然后我遇到了 WiX3 主要升级不起作用,其中接受的答案指出:

<块引用>

  1. 所有设置版本(同样,不是文件版本)必须是 1.0 或更高版本.

确实暂时将两个软件包的主要版本升级为 1 似乎解决了这个问题.但是,我无法追溯更改旧软件包的版本,因为它已经安装在数千台计算机上.在安装新软件包时彻底卸载旧软件包的最佳方法是什么?有没有比设置运行 msiexec.exe/x {PRODUCT-CODE}CustomAction 更好的方法?

解决方案

只要你的升级代码在版本之间是稳定的,你只需要正确编写升级表以包含你的版本想要升级.

您使用什么结构来实现重大升级?你使用 MajorUpgrade 元素?它应该可以直接开箱即用:

<MajorUpgrade Schedule="afterInstallInitialize"" DowngradeErrorMessage="已经安装了更高版本的 [ProductName].安装程序现在将退出."AllowDowngrades="no" AllowSameVersionUpgrades="no"/>

也许您正在使用旧式主要升级元素:如何实施 WiX 安装程序升级?.

您应该向我们提供您用于实施重大升级的 WiX 代码段.

我会确保升级表中指定的最高版本与您当前安装的安装版本相同.

<小时>

一些链接:

答案:

文档:

Recently I released a package versioned 0.8.3 and I'm ready to release a new package now. I was, however, struggling to implement a Major Upgrade / Upgrade. It seemed like the WIX_UPGRADE_DETECTED variable was never populated. Then I ran across WiX3 major upgrade not working where the accepted answer states that:

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

And indeed temporarily bumping the major version of both packages to 1 seemed to fix the issue. However I can't retroactively change the version of the old package as it is already installed on thousands of computers. What is the best way to cleanly uninstall the old package while installing the new one? Is there a better way than setting up a CustomAction that runs msiexec.exe /x {PRODUCT-CODE}?

解决方案

As long as your upgrade code is stable between releases, you just need the upgrade table properly authored to be inclusive of the version you want to upgrade.

What construct do you use to implement your major upgrade? Do you use the MajorUpgrade element? It should pretty much work straight out of the box:

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

Perhaps you are using old-style major upgrade elements: How to implement WiX installer upgrade?.

You should provide us with your WiX snippet that you use to implement major upgrades.

I would make sure that the max version specified in your Upgrade table is the same as the setup version you are currently installing.


Some Links:

Answers:

Documentation:

这篇关于使用主要版本零升级 WiX 生成的包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆