wix主要升级未安装所有文件 [英] wix major upgrade not installing all files

查看:133
本文介绍了wix主要升级未安装所有文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个非常简单的WiX项目(3.7版),该项目安装了一些文件(.NET程序版本6.0.0.0).我准备使用WiX中的MajorUpgrade功能发布新版本6.0.1.0.

I have a very simple WiX project (version 3.7) that installs somes files (a .NET program version 6.0.0.0). I'm ready to release a new version 6.0.1.0 using the MajorUpgrade functionality in WiX.

我在Product元素中保持UpgradeCode不变,并将版本从6.0.0.0更改为6.0.1.0

I'm keeping the UpgradeCode the same in the Product element and I change the Version from 6.0.0.0 to 6.0.1.0

<Product Id="*" Name="MyApp" Version="6.0.1.0" Manufacturer="Me" 
       UpgradeCode="$(var.TheUpgradeCodeGUID)">

在安装了6.0.0.0的计算机上,我运行新的安装程序.

On a machine with 6.0.0.0 installed, I run the new installer.

对旧版本6.0.0.0的删除可以正常运行(所有已安装的文件都将被删除),但是当安装程序继续安装新版本时,缺少2个文件:第3方DLL和第3方EXE(即尚未更改)不会被重新安装.

The removal of the old version 6.0.0.0 runs ok (all installed files are being removed), but when the installer continues to install the new version, 2 files are missing: a 3rd party DLL and a 3rd party EXE (that haven't been changed) are not being reinstalled.

<Component Id="AutomaticUpdaterWPF.dll" Guid="*">
        <File Id="AutomaticUpdaterWPF.dll" Source="AutomaticUpdaterWPF.dll" KeyPath="yes" Checksum="yes" />
</Component>
<Component Id="wyUpdaterProgram" Guid="*">
        <File Id="wyUpdaterProgram" Source="wyUpdate.exe" KeyPath="yes" Checksum="yes" />
</Component>

<中的所有其他文件.在重大升级过程中,正确安装了ComponentGroup>(某些已修改,一些未修改,包括其他第三方DLL).

All other files in the < ComponentGroup > (some modified, some unmodified incl. other 3rd party DLLs) are being installed correctly during the major upgrade.

如果在重大升级后单击修复",则2个丢失的文件会重新出现. 另外,如果我是第一次安装6.0.1.0版(不进行升级,而是先在干净的计算机上安装),则将直接且正常地安装这2个文件. (已在多台Windows计算机(XP,7和8)上进行了测试

If I click on "repair" after the major upgrade, the 2 missing files re-appear. Also, if I install version 6.0.1.0 for the first time (no upgrade, but first installation on a clean machine), then those 2 files are installed directly and normally. (tested on several Windows machine (XP, 7 and 8)

有人建议什么是错误的,以及如何解决?

Anybody any suggestion what is wrong and how to fix it?

推荐答案

提供的日志文件显示计算机上已经存在一些文件的较新版本:

The log file provided shows that newer versions of a few files already on the machine:

MSI (s) (0C:5C) [16:13:25:890]: Disallowing installation of component: {015A4DC1-56F4-562B-96B5-B3BE0D45FA5F} since the same component with higher versioned keyfile exists
MSI (s) (0C:5C) [16:13:25:890]: Disallowing installation of component: {4B6A1404-3892-5BEF-AB47-8FE3149211A4} since the same component with higher versioned keyfile exists

过去,我已经看到此更新程序存在此问题.克里斯托弗是正确的.更新程序更新了文件,但未告知MSI(它不会更新MSI,这不是正确的操作).新的MSI认为机器上有更新的东西,选择不安装其文件,但是在升级过程中,旧软件包将删除文件(它不会注意到版本较新).由于新安装程序选择不安装文件,因此最终没有任何结果……直到修复.

I've seen this problem with this updater in the past. Christopher is correct. The updater updated its files but didn't tell the MSI (it doesn't update the MSI which is not the correct thing to do). The new MSI thinks newer stuff is on the machine, chooses not to install its files, but during the upgrade the old package removes the files (it doesn't notice that the versions are newer). Since the new installer chose not to install the files you end up with nothing... until the repair.

要变通解决此问题,您需要稍后移动RemoveExistingProducts操作.如果您使用的是MajorUpgrade元素,那么Schedule='afterInstallExecute'Schedule='afterInstallFinalize'应该可以解决问题.您需要更加小心组件规则.

To work around the problem, you need to move your RemoveExistingProducts action later. If you're using the MajorUpgrade element then Schedule='afterInstallExecute' or Schedule='afterInstallFinalize' should do the trick. You'll need to be more careful with the Component Rules.

此外,恕我直言,第三方供应商不应在MSI之外更新文件.他们的决定是迫使您的产品采用特定的升级方式.

Also, IMHO, the 3rd party vendor should not be updating files outside of the MSI. Their decision is forcing your product into a particular way of upgrading.

这篇关于wix主要升级未安装所有文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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