WiX:“复制新文件文件:[1],目录:[9],大小 [6]"在安装 MSI 期间显示 [英] WiX: "Copying new files File: [1], Directory: [9], Size [6]" shown during installation of an MSI

查看:12
本文介绍了WiX:“复制新文件文件:[1],目录:[9],大小 [6]"在安装 MSI 期间显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,我在安装我们在 WiX 3.11 + VS 2017 中创建的 MSI 期间注意到奇怪的文本消息.我看到正在复制新文件文件:[1],目录:[9],大小 [6]]" 文本:

Recently, I noticed the strange text mesages during installation of our MSI created in WiX 3.11 + VS 2017. I'm seeing "Copying new files File: [1], Directory: [9], Size [6]" text:

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

Similarly, I'm getting the following during uninstallation:

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

This happens on the latest Windows 10 Pro build 15063.296. I think I didn't notice this problem before. I tried the same installer on Win 7 that was not updated for some time and it worked correctly (or better):

我认为我并不孤单,根据 此页面上的屏幕截图.但是我找不到任何信息.你遇到过同样的问题吗?如果是,有没有办法解决?

I think I'm not alone, according to the screenshot on this page. But I couldn't find any information. Did you experience the same problem? If yes, is there a way to fix it?

推荐答案

我找到了解决方案.我只需要在 <Product> 中添加以下行.在我的主要 wxs 中标记:

I found the solution. All I needed was to add the following line inside the <Product> tag in my main wxs:

<UIRef Id="WixUI_ErrorProgressText" />

说明

如果没有上述行,我的 MSI 程序包使用 Windows Installer 中的库存消息作为 ActionText,请参阅 本教程.看来,在早期版本的 Windows 中,这些消息与 Wix 提供的消息相同.这就是为什么我在 Win 7 中得到正确的Copying new files"但不正确的Copying new files File: [1], Directory: [9], Size [6]" 在最新的 Win 10 中.

Without the above mentioned line, my MSI package was using the stock messages inside Windows Installer for ActionText, see this tutorial. It seems, that in earlier versions of Windows, these messages were identical to those supplied by Wix. That's why I got the correct "Copying new files" in Win 7 but incorrect "Copying new files File: [1], Directory: [9], Size [6]" in the latest Win 10.

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

After adding a reference to WixUI_ErrorProgressText, the messages defined by Wix are used (these messages are correct) and everything is OK.

注意

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

In Wix, there's the following template defined as well (and this has confused me at first):

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

但如果您希望在安装过程中看到文件名及其大小,那您就错了.Wix 中的 ProgressDlg 没有显示它.如果您想要此信息,您需要覆盖该对话框并添加明确的 ActionData 文本.我没有测试它.在 PrepareDlg 中查看它是如何完成的.

But if you expect to see the file names and their sizes during installation, you're wrong. The ProgressDlg in Wix doesn't display it. If you want this info, you need to override that dialog and add the ActionData text explicitly. I didn't test it. See how it's done in PrepareDlg.

这篇关于WiX:“复制新文件文件:[1],目录:[9],大小 [6]"在安装 MSI 期间显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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