WiX MSI 升级不允许安装某些组件 [英] WiX MSI upgrade disallows installation of some components

查看:34
本文介绍了WiX MSI 升级不允许安装某些组件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试升级我的项目时,我得到以下大约八个组件的日志:

When I try to do an upgrade of my project, I get the following logs for about eight or so components:

MSI (c) (24:EC) [11:50:17:422]: Disallowing installation of component: {290E89A8-6BA7-59F2-B350-BE657C2823BC} since the same component with higher versioned keyfile exists

升级的卸载部分似乎删除了所有以前安装的文件,但是在升级过程中安装新文件时,它似乎不允许安装八个左右的组件/文件.升级成功,但这八个文件不存在.我使用以下标准进行升级(顺便说一下,我的产品 ID 是 *):

The uninstall portion of the upgrade seems to remove all of the previously installed files, but when it installs the new files during the upgrade, it seems to disallow the installation of eight or so components/files. The upgrade succeeds, but the these eight files are not present. I use the following criteria for my upgrade (my Product ID is *, by the way):

<Upgrade Id="{16B40AC6-1F80-47CD-9955-BDCC5BB297E4}">
    <UpgradeVersion Minimum="$(var.InstallerVersion)" Property="NEWPRODUCTFOUND" OnlyDetect="yes" IncludeMinimum="no" Language="1033" />
    <UpgradeVersion Minimum="0.0.0" Maximum="$(var.InstallerVersion)" Property="OLDPRODUCTFOUND" OnlyDetect="no" IncludeMinimum="yes" IncludeMaximum="yes" Language="1033" />
</Upgrade>
<InstallExecuteSequence>
...
    <RemoveExistingProducts Before="InstallInitialize" />
...
</InstallExecuteSequence>

我已尝试使用 此处描述的步骤来规避该问题 但没有成功.任何人都可以说明我如何能够在升级时安装我的新文件?奇怪的是,如果我通过程序和功能"卸载旧版本,然后安装新版本,它可以工作并安装所有文件(因此,它在不升级时可以工作),但是在升级时,它会不安装我的一些文件.

I have tried to circumvent the issue using the steps described here but have had no success. Could anyone shed some light as to how I may be able to get my new files installed on an upgrade? What is odd, is that if I do an uninstall of the old version through Programs and Features, and then install the new version, it works and all files are installed (hence, it works when not upgrading), but when upgrading, it does not install some of my files.

编辑:碰巧将 REINSTALLMODE 属性设置为 amus 将强制它重新安装文件,而不管版本和校验和如何,并且它现在可以工作,因为默认为这是omus,但我不确定这是否是最好的方法:

Edit: It just so happens that setting the REINSTALLMODE property to amus will force it to reinstall files regardless of version and checksum, and it works now since the default for it is omus, but I am not sure if this is the best approach:

<Property Id="REINSTALLMODE" Value="amus" />

推荐答案

这个问题似乎是一个反复出现的问题,类似于:

The issue seems to be a recurring one, similar to this:

http://support.microsoft.com/kb/905238

Windows 决定不安装这些文件,因为存在更高版本,但在我们进行重大升级时不会重新评估该决定.我以为这个问题已经在 MSI 4.5 中解决了.

Windows decides not to install the files because a higher version exists, but doesn't re-evaluate that decision when it turns out we're doing a major upgrade. I thought this issue had been fixed in MSI 4.5.

在 CostInitialize 之前执行 RemoveExistingProducts 应该可以解决问题,但如果您正在使用该功能,您会在升级过程中遇到一些 ICE 错误并丢失功能迁移.

Doing the RemoveExistingProducts before CostInitialize should solve the problem, but you'll get some ICE errors and lose migration of features during the upgrade, if you're using that capability.

这篇关于WiX MSI 升级不允许安装某些组件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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