ves2006
Posts: 11
Joined: Tue Jan 09, 2007 2:16 pm

Conditional Registry Values

Hi,
Could you please tell me how can I set different values to a registry key, depending on a property?

To be more precise, I develop multi language application and I want to set it's UI language, depending on the language of the installer (I'm using compound multilingual msi package).

Respectfully,
Vladislav Evgeniev

P.S.
I'm using Advanced Installer Professional
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi Vladislav,

When you create the registry value use [ProductLanguage] for its "Data". Read more about ProductLanguage property here:
http://msdn2.microsoft.com/en-us/library/aa370856.aspx

Regards,
Gigi
_____________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
ves2006
Posts: 11
Joined: Tue Jan 09, 2007 2:16 pm

Hi,
unfortunately it's not possible to use ProductLanguage, because the language identifier, we're using, is not standard (it's not LANGID).
We are using custom defined language identifiers instead (for example strings (BG, EN) or numbers (0, 1)).

Regards,
Vladislav
ves2006
Posts: 11
Joined: Tue Jan 09, 2007 2:16 pm

Any suggestions?
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi Vladislav,

You can use a custom action (written in VBScript or C++) that transform the language identifier into your custom identifier. What you need to do is to compare the value of ProductLanguage property and store in your own property (you can create it in the "Install Parameters" page) your custom identifier. Use this new property as "Data" for the registry value.

This custom action must be execute before writing values in registry. So you need to scheduled this custom action before "WriteRegistryValues" standard action. Use "Show Standard Action" toolbar menu to make standard action visible.

Hope this helps.

Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Common Problems”