Wix升级成功但新文件丢失

发布于 2024-10-07 20:18:35 字数 1393 浏览 6 评论 0原文

给定同一 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

愿得七秒忆 2024-10-14 20:18:35

看看这个来自希思·斯图尔特的帖子。他解释了为什么可能会出现与您类似的情况。如果您的问题仍然无法根据此信息缩小范围,您仍然可以发现最后一段中的建议很有用(关于 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文