Reputation: 17941
I have a requirement where by I need to show the license agreement according to the OS language. The localized license agreements (.rtf) are kept on a server.
I have created a custom action to detect OS language and download the respective license agreement, but how can I show the localized license agreement in the license agreement dialog?
I have all the dialog set files (.wxs) . I am using Wix_Minimal
dialog set.
I tried changing the following lines in WelcomeEulaDlg.wxs
<Control Id="LicenseText" Type="ScrollableText" X="130" Y="36" Width="226" Height="162" Sunken="yes" TabSkip="no">
<Text SourceFile="!(wix.WixUILicenseRtf=$(var.licenseRtf))" />
</Control>
to
<Control Id="LicenseText" Type="ScrollableText" X="130" Y="36" Width="226" Height="162" Sunken="yes" TabSkip="no" Text="[MyPropertyConatingRTFData]">
</Control>
but, nothing shows up in the license agreement text.
How can I set this text?
Upvotes: 6
Views: 4046
Reputation: 22426
Unfortunately the license agreement is only a file at build time - once the MSI is built the RTF is embedded in text format as a value in the Control
table. (You can view this using Orca)
What this means is that in order to update this control dynamically, your custom action(s) will need to do the following:
'UPDATE Control SET Text='" & sRTFText & "' WHERE Dialog_='LicenseAgreementDlg' AND Control='LicenseText'
An easier solution would be to include all languages in the same RTF file :)
Upvotes: 3
Reputation: 4277
You can have a session variable say LOCLICENSEFILEPATH
which will contain the path to License file based upon localization. So in the Control you simply need to pass this variable.
<Control Id="AgreementText" Type="ScrollableText" X="20" Y="60" Width="330" Height="140" Sunken="yes" TabSkip="no">
<Text SourceFile="[LOCLICENSEFILEPATH]" />
</Control>
Upvotes: -1