How to set text value in bundle.wxs using $(var)

Apr 20, 2015 at 9:10 PM
Hi, I tried to set a version text using a wix variable (instead of [WixBundleVersion]), e.g.

in "bundle10.wxs"
<?xml version="1.0"?>
<?include "version.wxi"?> <!-- This includes "<?define MyProductVersion= "1.0.4" ?>" -->
<Wix ...
   <Bundle ...
      <WixVariable Id="WixExtbaThemeXml" Value="Bundle4Theme.xml" />
      <Variable Name="text_version" Type="string" Value="$(var.MyProductVersion)"/>
      <Chain ...
    </Bundle>
</Wix>
and in "Bundle4Theme.xml"
<Page Name="Install">
   <!--<Text X="185" Y="-81" Width="-11" Height="17" FontId="3" DisablePrefix="yes">#(loc.InstallVersion)</Text>-->
   <Text Name="text_version" X="185" Y="-81" Width="-11" Height="17" FontId="3" DisablePrefix="yes">empty</Text>
</Page>
However, it always displayed "empty". So I believe "Variable" element in "bundle" doesn't like $(var.xxx).
How can I do this?

Since the above didn't work, I even added the following in OnDetect():
        hr = m_pEngine->SetVariableString(L"text_version", L"v1.0.4");
        BalExitOnFailure(hr, "Failed to set variable.");
This didn't work either: same "empty" was displayed.

Any advice?
Coordinator
Apr 20, 2015 at 10:13 PM
I don't think this is possible, I have only ever set [WixBundleVersion].