WiX“重大升级"降级时未完全安装应用程序 [英] WiX "Major Upgrade" doesn't completely install app on downgrade

查看:25
本文介绍了WiX“重大升级"降级时未完全安装应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前,只要更新到较新的版本号,所有升级都可以正常工作,但是在降级时我会遇到奇怪的行为.似乎它会卸载现有版本,然后部分安装我要安装的版本,目标位置中尚不存在主 exe,但创建了宣传的快捷方式.打开宣传的快捷方式后,它会完成安装(大概是进行修复),然后就可以正常运行了.

Currently all upgrades work fine whenever updating to a newer version number, however I'm getting an odd behavior when downgrading. It seems that it'll uninstall the existing version and then partially install the version that I'm trying to install, the main exe doesn't exist in the target location yet, but advertised shortcuts are created. When the advertised shortcut is opened, it'll finish the installation (presumably do a repair) and then it'll run fine.

有人知道为什么会这样吗?

Does anyone have any ideas why this is happening?

我的升级块如下所示:

<UpgradeVersion Minimum="0.0.0.0" Maximum="99.0.0.0" Property="PREVIOUSVERSIONSINSTALLED" IncludeMinimum="yes" IncludeMaximum="no" IgnoreRemoveFailure="yes"/>

(IgnoreRemoveFailure 试图解决这个问题,但它似乎没有做任何事情)

(The IgnoreRemoveFailure was an attempt to fix this issue, but it doesn't appear to have done anything)

在我的 InstallExecuteSequence 我有 <RemoveExistingProducts After="InstallValidate"/>

In my InstallExecuteSequence I have <RemoveExistingProducts After="InstallValidate" />

我还有 Product Id="*"Package Id="*"

之所以需要降级是因为客户端应用程序需要运行与服务器相同的版本以确保兼容性,并且整个过程需要自动化,因此如果客户端/服务器版本在登录时不匹配用户只需单击是"即可下载、安装和启动正确的版本.到目前为止,这适用于升级,但对于降级,需要一个额外的不直观的步骤,即手动重新启动应用程序,然后在启动之前看到一个 Windows 安装程序对话框.

The reason the downgrade is needed is because the client application needs to be running the same version as the server to ensure compatibility, and the entire process needs to be automated so if the client/server versions don't match on signin the user can just click "yes" and the proper version is downloaded, installed and started. This is working so far for upgrades, but for downgrades an extra unintuitive step is needed which is to relaunch the app manually and then see a windows installer dialog pop up before it launches.

最终的结果是,无论升级还是降级,都需要完全卸载当前版本,并完全安装下载的版本,所以如果有其他方法可以做到这一点,那也是一个很好的答案.

The end result is that regardless of upgrade or downgrade, the current version needs to be fully uninstalled and the downloaded version fully installed, so if there's another way to accomplish that, that'll also be a good answer.

推荐答案

这对我有用:

<Wix ...>
  <Product ...>
    <Property Id="REINSTALLMODE" Value="amus" />
    <MajorUpgrade AllowDowngrades="yes" />

这篇关于WiX“重大升级"降级时未完全安装应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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