!include "Sections.nsh" ;-------------------------------- Name "One Section" OutFile "one-section.exe" ;-------------------------------- ; Pages Page components Page instfiles ;-------------------------------- ; Sections Section /o "Group 1 - Option 1" g1o1 SectionEnd Section /o "Group 1 - Option 2" g1o2 SectionEnd Section /o "Group 1 - Option 3" g1o3 SectionEnd SectionGroup /e "Group 2" g2 Section /o "Group 2 - Option 1" g2o1 SectionEnd Section /o "Group 2 - Option 2" g2o2 SectionEnd Section /o "Group 2 - Option 3" g2o3 SectionEnd SectionGroupEnd ;-------------------------------- ; Functions ; $1 stores the status of group 1 !macro GroupRO GroupId Push $0 IntOp $0 ${SF_SECGRP} | ${SF_RO} IntOp $0 $0 | ${SF_EXPAND} SectionSetFlags ${GroupId} $0 Pop $0 !macroend Function .onInit StrCpy $1 ${g1o1} ; Group 1 - Option 1 is selected by default !insertmacro GroupRO ${g2} FunctionEnd Function .onSelChange !insertmacro StartRadioButtons $1 !insertmacro RadioButton ${g1o1} !insertmacro RadioButton ${g1o2} !insertmacro RadioButton ${g1o3} !insertmacro RadioButton ${g2o1} !insertmacro RadioButton ${g2o2} !insertmacro RadioButton ${g2o3} !insertmacro EndRadioButtons FunctionEnd