Mehul Parmar
Mehul Parmar

Reputation: 380

How to show version number in title of MSI installer in WIX?

I want to show the version number only in the title and not anywhere else. Not even in the "Welcome to the XYZ setup wizard" line. By changing the name in the product line<Product Name="$(var.productName) $(var.ProductVersion)"...> has a lot of side effects. Can anybody help me with this?

Upvotes: 1

Views: 1249

Answers (1)

Stein &#197;smul
Stein &#197;smul

Reputation: 42136

String Override: In case you mean the title bar at the top (see screenshot below), you can try to override the string id "WelcomeDlg_Title" (as opposed to WelcomeDlgTitle - yes they are different, look closely) - and do this for all string entries that end in _Title:

<?xml version="1.0" encoding="utf-8"?>
<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">

  <...>

  <String Id="WelcomeDlg_Title">[ProductName] - [ProductVersion]</String>

  <String Id="SetupTypeDlg_Title">[ProductName] - [ProductVersion]</String>
  <String Id="WelcomeEulaDlg_Title">[ProductName] - [ProductVersion]</String>
  <String Id="BrowseDlg_Title">[ProductName] - [ProductVersion]</String>
  <String Id="CancelDlg_Title">[ProductName] - [ProductVersion]</String>
  <String Id="CustomizeDlg_Title">[ProductName] - [ProductVersion]</String>
  <String Id="LicenseAgreementDlg_Title">[ProductName] - [ProductVersion]</String>
  <String Id="VerifyReadyDlg_Title">[ProductName] - [ProductVersion]</String>
  <String Id="WaitForCostingDlg_Title">[ProductName] - [ProductVersion]</String>

  <...etc...>

</WixLocalization>

Summary: All you need to do is as follows:

  • Set up a WiX project in the normal way, add UI support: WixUIExtension.dll
  • Add localisation file (for any number of languages)
  • Override this string ID in all localization files and inject the version [ProductVersion]

Existing Answer: Rather than repeating the full procedure, please see this answer: How show version number in title of installation in WIX?

Title

Upvotes: 3

Related Questions