如何使用wix bootstraper更改exe文件的详细信息?

3

我有一个Visual Studio捆绑文件:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
    <Bundle 
    Name="Some Name"
    Version="3.2.2" 
    Manufacturer="Some Company" 
    Copyright="Copyright: Some Company, Inc">
    ...
    </Bundle>
</Wix>

在构建exe后,详细菜单包含两个参数(文件描述和产品名称),这些参数具有相同的值。是否有一种方法只使用WIX功能使这些值不同?

enter image description here

1个回答

5
自Wix版本3.10.2起,您无法为exe文件的描述资源中的ProductNameFileDescription字段设置不同的值。
查看WIX源代码,特别是来自此处可下载的WIX310-Debug.zip中的src \tools\wix\Binder.cs文件,将显示以下用于设置exe文件资源的代码片段。
        Microsoft.Deployment.Resources.VersionStringTable strings = version[1033];
        strings["LegalCopyright"] = bundleInfo.Copyright;
        strings["OriginalFilename"] = Path.GetFileName(outputPath);
        strings["FileVersion"] = bundleInfo.Version;    // string versions do not have to be four parts.
        strings["ProductVersion"] = bundleInfo.Version; // string versions do not have to be four parts.

        if (!String.IsNullOrEmpty(bundleInfo.Name))
        {
            strings["ProductName"] = bundleInfo.Name;
            strings["FileDescription"] = bundleInfo.Name;
        }

请注意,ProductNameFileDescription 设置为相同的值。
如果这很重要,您可以通过 WiX 问题跟踪数据库请求新功能:https://github.com/wixtoolset/issues/issues

请查看github源代码以获取当前版本 - 仍然设置为相同的内容。 - David Fraser
其他人已经提到了Simple Resource Tool for Windows作为可用于修改构建后属性的工具。但是它在我们的可执行安装程序上并没有奏效... - David Fraser

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接