How show version number in title of installation in WIX?

Pra*_*ash 6 c# wix wix3 visual-studio

I need to display the version number in the title along with the application name.

Currently, it looks like

在此处输入图片说明

Here is my wix snippet:

<Product Id="$(var.ProductId)" Name="Test Application" Language="1033" Version="$(var.ProductVersion)" Manufacturer="Test1111 Inc" 
       UpgradeCode="C9BC6B42-FCAF-4E96-8F8F-E9D0AC4F393B">
Run Code Online (Sandbox Code Playgroud)

If I change it (append version number in the Name attribute) as below, it will display the version number in all the places Title, Welcome text/description but I just want to change in Title.

<Product Id="$(var.ProductId)" Name="Test Application $(var.ProductVersion)" Language="1033" Version="$(var.ProductVersion)" Manufacturer="Test1111 Inc" 
       UpgradeCode="C9BC6B42-FCAF-4E96-8F8F-E9D0AC4F393B">
Run Code Online (Sandbox Code Playgroud)

How we can accomplish this in Wix?

Ste*_*mul 6

本地化覆盖:您可以尝试添加本地化文件,然后覆盖WelcomeDlgTitle字符串(可以在此处找到 WiX GUI 字符串列表/字符串标识符列表(英文):

  1. 请注意,这假定Mondo 对话框集:
    • 添加到 WiX 标记: <UIRef Id="WixUI_Mondo" />
    • 添加参考 %ProgramFiles(x86)%\WiX Toolset v3.11\bin\WixUIExtension.dll
    • Visual Studio 中的 WiX Hello World 示例(带有注释的 WiX 标记通常足以让开发人员了解事物的要点)
  2. 在 Visual Studio 中右键单击您的 WiX 项目=>添加=>新项目...
  3. 选择WiX v3在左边的菜单。双击Localization file(添加 WiX v4 文件很常见,请仔细检查)
  4. 将以下字符串添加到本地化文件中:

    <?xml version="1.0" encoding="utf-8"?>
    <WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
      <String Id="WelcomeDlgTitle">{\WixUI_Font_Bigger}Welcome to the [ProductName] [ProductVersion] Setup Wizard</String>
    </WixLocalization>
    
    Run Code Online (Sandbox Code Playgroud)
  5. 编译和测试

示例对话框

示例 WiX 标题更改

WiX的GUI:我很困惑自己与WiX的GUI,所以我写了这个小概述和“检查表”,以更好地记住(使用类似的方法来改变一个对话框项的风格):更改文本颜色为维克斯对话框

链接


Chr*_*ter 3

WiX UI 扩展不允许此类自定义。你的两次机会是

1)定义Name =“Test Application $(var.ProductVersion)”(副作用。程序和功能中列出的版本两次

2)停止使用 WiXUI 扩展,而是将https://github.com/wixtoolset/wix3/tree/develop/src/ext/UIExtension/wixlib中的所有代码克隆 到您的项目中。