Wix升级成功但新文件丢失
给定同一 wix 安装程序的两个版本,我正在尝试进行次要升级(相同的升级和产品代码,版本递增),但遇到问题。它包括两个功能,我为每个功能添加了一个文件。
这些功能基本上如下所示:
<Feature Id="Sample1_Feature" Title="Sample1" Level="1" AllowAdvertise="no" Absent="allow" InstallDefault="local">
<ComponentGroupRef Id="Sample1ProjectOutput"/>
</Feature>
<Feature Id="Sample2_Feature" Title="Sample2" Level="1" AllowAdvertise="no" Absent="allow" InstallDefault="local">
<ComponentGroupRef Id="Sample2ProjectOutput"/>
</Feature>
在初始安装中,组件组中的所有文件都会安装,并在日志文件中显示以下几行:
MSI (s) (AC:D4) [10:26:58:083]: Feature: Sample1_Feature; Installed: Absent; Request: Local; Action: Local
但是
MSI (s) (AC:D4) [10:26:58:083]: Feature: Sample2_Feature; Installed: Absent; Request: Local; Action: Local
,在升级过程中,安装了为 Sample2 添加的文件,但未安装为 Sample1 添加的文件。这是我在日志文件中注意到的一个差异:
MSI (s) (AC:B8) [10:38:08:682]: Feature: Sample1_Feature; Installed: Advertise; Request: Reinstall; Action: Reinstall
我
MSI (s) (AC:B8) [10:38:08:682]: Feature: Sample2_Feature; Installed: Local; Request: Reinstall; Action: Reinstall
相信 Sample1 中丢失的文件未安装,因为“已安装:”值是 Advertise。我不明白的是为什么那个是“Advertise”(广告)而 Sample2(正确地)是“Local”(本地)。正如您在上面所看到的,这两个功能都不允许广告。
对于为什么会发生这种情况,我将不胜感激。
提前致谢。
Given two versions of the same wix installer, I am attempting a minor upgrade (same upgrade and product code, version incremented) but having a problem. It includes two features, to each of which I have added one file.
The features look basically like this:
<Feature Id="Sample1_Feature" Title="Sample1" Level="1" AllowAdvertise="no" Absent="allow" InstallDefault="local">
<ComponentGroupRef Id="Sample1ProjectOutput"/>
</Feature>
<Feature Id="Sample2_Feature" Title="Sample2" Level="1" AllowAdvertise="no" Absent="allow" InstallDefault="local">
<ComponentGroupRef Id="Sample2ProjectOutput"/>
</Feature>
In the initial install, all files in the component group get installed with these lines in the log file:
MSI (s) (AC:D4) [10:26:58:083]: Feature: Sample1_Feature; Installed: Absent; Request: Local; Action: Local
and
MSI (s) (AC:D4) [10:26:58:083]: Feature: Sample2_Feature; Installed: Absent; Request: Local; Action: Local
However, during the upgrade the added file for Sample2 is installed but the added file for Sample1 is not. And here is a difference I noticed in the log file:
MSI (s) (AC:B8) [10:38:08:682]: Feature: Sample1_Feature; Installed: Advertise; Request: Reinstall; Action: Reinstall
and
MSI (s) (AC:B8) [10:38:08:682]: Feature: Sample2_Feature; Installed: Local; Request: Reinstall; Action: Reinstall
I believe that the missing file from Sample1 is not installed because the "Installed:" value is Advertise. What I don't understand is why that one is Advertise and Sample2 is (correctly) Local. As you can see above, neither feature allows Advertise.
I would appreciate any help with why this might be happening.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看看这个来自希思·斯图尔特的帖子。他解释了为什么可能会出现与您类似的情况。如果您的问题仍然无法根据此信息缩小范围,您仍然可以发现最后一段中的建议很有用(关于 MSIENFORCEUPGRADECOMPONENTRULES 属性)。
另外,另一个希思建议如何在这个意外广告发生后修复产品。希望这有帮助。
Take a look at this post from Heath Stewart. He explains why there might be a situation the similar to what you have. If your problem still can't be narrowed down based on this info, you can nevertheless find the suggestion in the last paragraph useful (about MSIENFORCEUPGRADECOMPONENTRULES property).
Also, another advice from Heath how to repair products after this accidental advertise has happened. Hope this helps.