WiX“主要升级"不会在降级时完全安装应用程序 [英] WiX "Major Upgrade" doesn't completely install app on downgrade

查看:81
本文介绍了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天全站免登陆