简体   繁体   English

产品版本显示在 WIX 制作的 MSI 文件属性中?

[英]Product version displayed in WIX-made MSI file properties?

How to have the Product version displayed in the MSI file properties (as displayed by Windows Explorer) ?如何在 MSI 文件属性中显示产品版本(如 Windows 资源管理器所示)?

Our installer is created using WIX.我们的安装程序是使用 WIX 创建的。 All we see is the product GUID displayed as the Revision Number in the Details tab of the MSI file properties.我们所看到的只是在 MSI 文件属性的“详细信息”选项卡中显示为修订号的产品 G​​UID。

We'd like to have the product version (eg: 5.0.1.12345) so that the support team (and customers) can easily check the version of a given file.我们想要产品版本(例如:5.0.1.12345),以便支持团队(和客户)可以轻松检查给定文件的版本。

Simply add the Comments attribute to the Package tag as below.只需将Comments 属性添加到 Package 标签,如下所示。

<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" Comments="Version: 5.0.1.12345" />

There is no version property to be set.没有要设置的版本属性。 So as an alternative we are adding it to the comments attribute.因此,作为替代方案,我们将其添加到 comments 属性中。 So it can be seen in the properties of the msi.所以可以在msi的属性中看到。

I don't think that you can actually set a file version on MSI files in WIX.我认为您实际上无法在 WIX 中为 MSI 文件设置文件版本。 What we do is that we edit the description property of the Package.我们所做的是编辑 Package 的 description 属性。

<Package InstallerVersion="200" Description="Version: !(bind.FileVersion.filD6DA798364FCF1273EEE80AEF914C743)" InstallScope="perMachine" ...

And then we also make sure that the same version is used for the Product:然后我们还确保产品使用相同的版本:

<Product Id="*" Name="Name" Language="1033" Version="!(bind.FileVersion.filD6DA798364FCF1273EEE80AEF914C743)" ...

The description is visible in your MSI file properties and so the version will be visible in the description.描述在您的 MSI 文件属性中可见,因此版本将在描述中可见。 I hope that is what you want!我希望这就是你想要的!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM