[wix-users] Use variables in bundle theme

Helge Kruse Helge.Kruse at gmx.net
Mon Jun 25 03:43:45 PDT 2018


I have an installer package (MSI) that is packed in a bundle. The
bundle adds the required run-time libraries.

I want to show the current version in the bundle's welcome dialog. For
that purpose I customized the theme file:

<?xml version="1.0" encoding="utf-8"?>
<?include Defines.wxi?>
<Theme xmlns="http://wixtoolset.org/schemas/thmutil/2010">
  ...
  <Page Name="Install">
    <Text Name="X" X="50" Y="100" FontId="3" Height="80"
Width="300">This is mySoft #(var.CurrentVersion)</Text>
   ...
  </Page>
</Theme>

The file Defines.wxi contains just the definition of the current version:

<?xml version="1.0" encoding="utf-8"?>
<Include>
  <?define CurrentVersion="1.03.01"?>
</Include>

The Bundle.wxs references the theme file using
WixStandardBootstraspperApplication:

<Bundle Name="mySoft" Version="$(var.CurrentVersion)"
Manufacturer="me" UpgradeCode="GUID">
 <BootstrapperApplicationRef
Id="WixStandardBootstrapperApplication.RtfLicense" >
    <bal:WixStandardBootstrapperApplication LicenseFile="lic.rtf"
ThemeFile="Theme.xml" />
  </BootstrapperApplicationRef>
</Bundle>

Unfortunately the CurrentVersion is not expanded when the bundle is
build. How can this be done?

Regards
Helge


More information about the wix-users mailing list