无需卸载现有版本即可升级 WiX [英] WiX Upgrade without uninstallation of existing version

查看:35
本文介绍了无需卸载现有版本即可升级 WiX的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

WiX 中的 MajorUpgrade 元素似乎正在卸载现有版本.但是我有一个要求,我必须在不卸载 1.0.0 的情况下从 1.0.0 升级到 2.0.0.但这并不意味着,它会在添加/删除程序"中同时显示 1.0.0 和 2.0.0.我的 1.0.0 版本有一个文件、一个注册表项、一个自定义的 Windows 服务等等.我的 2.0.0 本质上将修改现有文件并添加一个新文件.在我们的例子中,可以只进行这样的更改并且仍然增加主要版本.但为此,我不想卸载和重新安装服务等等.但如果是全新安装,则必须安装所有组件.例如,如果客户安装了 7.9.0 版本并希望升级到 8.0.0(这在技术上可能是一次重大升级,因为主要版本已更新或次要升级,因为可能只有从 7.9.0 到 8.0 的增量更改.0?),完全卸载 7.9.0 可能会导致数据丢失等问题.有没有办法实现这一目标?如果是这样,任何人都可以提供一些步骤/示例或提供一些显示此内容的链接吗?注意:我不是谈论补丁.我能够得到一个补丁工作.但我也对 Minor upgrade 和 Small update 感到困惑.

The MajorUpgrade element in WiX seems to be uninstalling the existing version. But I have a requirement wherein I have to upgrade from 1.0.0 to 2.0.0 without uninstalling 1.0.0. But this doesn't mean, it will have both 1.0.0 and 2.0.0 showing in the Add/Remove Programs. My 1.0.0 version has a file, a registry entry, a custom windows service and so on. My 2.0.0 essentially, will modify an existing file and add a new file. In our case, it is possible to make only changes like these and still increment the major version. But for this, I don't want to uninstall and reinstall the services and so on. But if it's a fresh install, all the components will have to be installed. For example, if a customer has 7.9.0 version installed and wants to upgrade to 8.0.0 (This technically might be a major upgrade because major version is updated or minor upgrade because there may be only incremental changes going from 7.9.0 to 8.0.0?), uninstalling 7.9.0 completely may lead to issues like loss of data and so on. Is there a way to achieve this? If so, can anyone please provide some steps / examples or provide some links showing this? Note: I am not talking about Patch. I am able to get a patch working. But I am also confused between Minor upgrade and Small update.

FireGiant 的教程谈到使用<升级>元素而有许多其他文章谈论使用 <MajorUpgrade>元素.

FireGiant's Tutorial talks about using <Upgrade> element whereas there are many other articles which talk about using <MajorUpgrade> element.

推荐答案

jbudreau 是正确的.有两种不同类型的主要升级.早期主要升级会在安装新版本之前卸载现有版本.这是您在帖子中解释的行为.

jbudreau is correct. There are two different types of major upgrades. The early major upgrade uninstalls the existing version prior to installing the new version. This is the behavior you explain in your post.

查看执行序列表并将 RemoveExistingProducts 动作移到 InstallFinalize 之后,这将成为后期升级,它使用组件规则覆盖现有文件,然后删除任何应该删除的文件.

Look at the execute sequence table and move the RemoveExistingProducts action to after InstallFinalize and this will now become the late upgrade, where it overwrites existing files using component rules and then remove any files that should be removed.

这篇关于无需卸载现有版本即可升级 WiX的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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