Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
666 views
in Technique[技术] by (71.8m points)

windows installer - WiX: "Copying new files File: [1], Directory: [9], Size [6]" shown during installation of an MSI

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:

enter image description here

Similarly, I'm getting the following during uninstallation:

enter image description here

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):

enter image description here

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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" />

Explanation

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.

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

Note

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

"File: [1], Directory: [9], Size [6]"

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...