Skip to content
⌘ NSIS Forum Archive

InstallOptions and RadioButtons

5 posts

Striker53#

InstallOptions and RadioButtons

Hi,

I want that the user can chose only one section of a sectiongroup how on the example one-section.nsi! I added:
Function .onSelChange
!insertmacro StartRadioButtons $1
!insertmacro RadioButton ${g1o1}
!insertmacro RadioButton ${g1o2}
!insertmacro EndRadioButtons

!insertmacro StartRadioButtons $2
!insertmacro RadioButton ${g2o1}
!insertmacro RadioButton ${g2o2}
!insertmacro EndRadioButtons
FunctionEnd
Function .onInit

StrCpy $1 ${g1o1} ; Group 1 - Option 1 is selected by default
StrCpy $2 ${g2o1} ; Group 2 - Option 1 is selected by default

FunctionEnd
and the g1o1... behind the sections. But i get a Error:
Error in script ... aborting creation process

Whats wrong?
Red Wine#
Did you remember to !include "Sections.nsh" ?
Did you add the sections id's (g1o1, g2o2 etc) properly ?
Striker53#
I have included sections.nsh.
I have add the sections id´s, e.g.: "Section "Name" SEC0002 g1o1"
Red Wine#
"Section "Name" SEC0002 g1o1" is not proper,
you should change it to Section "Name" g1o1 and so on for all sections.
The g1o1 is the section id which is referred as ${g1o1}.