I use the pre defined variable LANGUAGE to find out, if the selected installation language is German or not. Dependend of this information i want install a german or an english help file. The code i used is the following:
Set Variable INSTALLLANG to $LANGUAGE$
...
if Variable INSTALLLANG Equals German
Create Shortcut $SHORTCUTFOLDER$\Hilfe to $TARGETDIR$\system\help\deutsch\ems-edm.chm, Pin to Start Menu
else
Create Shortcut $SHORTCUTFOLDER$\Hilfe to $TARGETDIR$\system\help\english\ems-edm.chm, Pin to Start Menu
end
I watch the Variable INSTALLANG in debug mode and the value ist German but always the else part is executed. Where ist the mistake?
The help definition for the pre-defined language variable says:
LANGUAGE: Set to an empty string in non multi-lingual installs. In multi-lingual installs, holds the active language. Assign a new value to this variable to change the active language from within your setup script in multi-lingual installs.
Likely result is that the language value might be null. Consider displaying it's value in a message box before the 'if' statement. That will confirm if it has a language value.
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP
If you want to conditionally create your shortcut based on target OS Language, you can use the "Get System Setting" command to assign your INSTALLLANG variable.