简体   繁体   中英

How to add custom message with alignment in Welcome message of MSI installer using wix

I used this line in wxl file to add custom message but still not able to align the version number properly

  <String Id="WelcomeDlgDescription" Overridable="yes">The Setup Wizard will install [ProductName] on your computer. Click Next to continue or Cancel to exit the Setup Wizard.&#13;&#10;&#13;&#10;&#13;&#10;{\WixUI_Font_Title}Version - [ProductVersion]</String>

I want the results to be like this

在此输入图像描述

Also, I am not able to change the fonts.

Updated

I am able to achieve this. Version left hanging in the middle and not going at the end, 在此输入图像描述

Limitation : It looks like you can only have one style per string. I am not sure, but it says in the documentation that you have to refer to the style at the beginning of the string:

<TextStyle Id="Test" FaceName="Arial" Blue="255" Size="12" Strike="yes" />

<..>

<String Id="WelcomeDlgDescription">{\Test}Version - [ProductVersion]</String>

Customizing WiX Dialogs : You might need to change the whole dialog to add two fields so you can put the version number in its own text box featuring its own style. Doing so is a little involved, and I have a description of it here: Customizing WiX Dialogs . Please have a quick read. It also describes how to change font color and style.

Update : Nice little sample for how you can insert a custom dialog: Wix UpgradeVersion .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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