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

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

问题描述

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

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. 所有设置版本(同样,不是文件版本)必须为1.0或更高.

并且确实暂时将这两个软件包的主要版本都提高到了1,似乎可以解决此问题.但是,由于旧软件包的版本已经安装在数千台计算机上,因此我无法追溯更改它的版本. 在安装新软件包的同时干净地卸载旧软件包的最佳方法是什么?有没有比设置运行msiexec.exe /x {PRODUCT-CODE}CustomAction更好的方法?

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.

您使用什么结构来实施主要升级?您是否使用 MajorUpgrade element ?它应该可以直接使用:

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" />

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

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

您应向我们提供用于实施主要升级的WiX代码段 .

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:

答案:

  • Bob Arnson, WiX Developer's blog on major upgrades: https://www.joyofsetup.com/2010/01/16/major-upgrades-now-easier-than-ever/
  • Larger sample with old-style major upgrade elements:
    Doing Major Upgrade in Wix creates 2 entries in Add/Remove Programs
  • How to implement WiX installer upgrade?

文档:

  • http://wixtoolset.org/documentation/manual/v3/howtos/updates/major_upgrade.html
  • https://www.firegiant.com/wix/tutorial/upgrades-and-modularization/

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

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