gpt4 book ai didi

WiX:在安装 MSI 期间显示 "Copying new files File: [1], Directory: [9], Size [6]"

转载 作者:行者123 更新时间:2023-12-04 10:14:53 25 4
gpt4 key购买 nike

最近,我注意到在安装我们在 WiX 3.11 + VS 2017 中创建的 MSI 时出现奇怪的文本消息。我看到“ Copying new files File: [1], Directory: [9], Size [6] ”文本:

enter image description here

同样,我在卸载过程中得到以下信息:

enter image description here

这发生在最新的 Windows 10 Pro build 15063.296 上。我想我之前没有注意到这个问题。我在 Win 7 上尝试了一段时间没有更新的相同安装程序,它运行正常(或更好):

enter image description here

根据 screenshot on this page ,我想我并不孤单。但是我找不到任何信息。
你遇到过同样的问题吗?如果是,有没有办法修复它?

最佳答案

我找到了解决方案。我所需要的只是在我的主 wxs 的 标签内添加以下行:

<UIRef Id="WixUI_ErrorProgressText" />

说明

如果没有上面提到的那一行,我的 MSI 包使用的是 Windows Installer 中的常用消息来处理 ActionText,请参阅 this tutorial .在早期版本的 Windows 中,这些消息似乎与 Wix 提供的消息相同。这就是为什么我在 Win 7 中得到正确的“ Copying new files ”但不正确的“ Copying new files File: [1], Directory: [9], Size [6] ”最新的Win 10。

添加对WixUI_ErrorProgressText 的引用后,使用Wix 定义的消息(这些消息是正确的),一切正常。

备注

在 Wix 中,还定义了以下模板(起初这让我感到困惑):

" 文件:[1],目录:[9],大小 [6] "

但是,如果您希望在安装过程中看到文件名及其大小,那您就错了。 ProgressDlg在 Wix 中不显示它。如果您需要此信息,您需要 override that dialog并显式添加 ActionData 文本。我没有测试它。在 PrepareDlg 中查看它是如何完成的.

关于WiX:在安装 MSI 期间显示 "Copying new files File: [1], Directory: [9], Size [6]",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44161526/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com