Create InstType with dynamic section list
I need to select an installation type from a combo, each installation containing a specific required section (the user can not unselect it).
I tried the following but it is not working:
InstType "type1"
InstType "type2"
InstType /NOCUSTOM
Section "Section1" Section1
Section 1 RO
SectionEnd
Section "Section2" Section2
Section 2 RO
SectionEnd
...
Function .onSelChange
GetCurInstType $0
${If} $0 = 0
SectionSetText ${Section2} ""
SectionSetText ${Section1} "Section1"
${Else}
SectionSetText ${Section1} ""
SectionSetText ${Section2} "Section2"
${EndIf}
FunctionEnd
...
I also have the same thing within onInit.
My problem is that when selecting Type1 it is working fine, but when selecting type2 I only have an unselected empty section.
Any idea?