Page 1 of 1

Hide feature depending on selection previous dialog

Posted: Fri Jun 29, 2012 4:05 am
by Ton_B
Some features inside my setup are language dependant features.
In one of the first dialogs (prior to the componentstree dialog) the user has to select the language in which the setup will continue.

What I need, is that some features then will be hidden when language #1 is chosen but must be visible when language #2 is chosen.

How can I accomplish this?

Re: Hide feature depending on selection previous dialog

Posted: Fri Jun 29, 2012 7:34 am
by BobSchaefer
You want to use the "Set Component Visibility" command in the MSI script will allow you to hide and show the options, you'll also want to use the "Set Component State" as well, to unselect the ones that are no longer visible.

Re: Hide feature depending on selection previous dialog

Posted: Fri Jun 29, 2012 8:09 am
by Ton_B
Ah,

Works perfecly!

I've coded this just before calling the componentstree dialog.
I'm checking if the variable LANG contains -BE (checking for language code nl-BE or fr-BE, thus, checking for Belgium)

Code: Select all

 Deselect Component: ManageMvg
  if Variable LANG Contains -BE
    Show Component: ManageMvg
  else
    Hide Component: ManageMvg
  end
  Display Dialog: componentstree, wait for dialog to return (modal)

Thanx

Re: Hide feature depending on selection previous dialog

Posted: Fri Jun 29, 2012 8:20 am
by FrancescoT
Dear Ton,

you could also use the IA pre-defined vaiable 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.
Regards

Re: Hide feature depending on selection previous dialog

Posted: Mon Jul 02, 2012 12:48 am
by Ton_B
Hi Francesco,

Well, using the LANGUAGE varaible does not do the trick :)

Our software need more than just the language, but also needs the culture,
Therefore I've made a custom combobox in where you can choose the language-culture code.

But thank you anyway.