; example1.nsi
;
; This script is perhaps one of the simplest NSIs you can make. All of the
; optional settings are left to their default settings. The installer simply 
; prompts the user asking them where to install, and drops a copy of makensisw.exe
; there. 

;--------------------------------

; The name of the installer
Name "Example"

; The file to write
OutFile "example.exe"

; The default installation directory
InstallDir $PROGRAMFILES\Example1

;--------------------------------
!include "MUI.nsh"
!include "Sections.nsh"
; Pages
!insertmacro MUI_PAGE_COMPONENTS
; Directory page
!insertmacro MUI_PAGE_DIRECTORY
; Instfiles page
!insertmacro MUI_PAGE_INSTFILES

;--------------------------------
!insertmacro MUI_LANGUAGE "English"

Subsection  blah EX

section /o example1 EX1
sectionend

section /o example2 EX2
sectionend

section /o example3 EX3
sectionend

section /o example4 EX4
sectionend

section /o example5 EX5
sectionend

section /o example6 EX6
sectionend
subsectionend

Function .onInit
StrCpy $1 ${EX1}
functionend

Function .onselchange


     !insertmacro StartRadioButtons $1
     !insertmacro RadioButton ${EX1}
     !insertmacro RadioButton ${EX2}
     !insertmacro RadioButton ${EX3}
     !insertmacro RadioButton ${EX4}
      !insertmacro RadioButton ${EX5}
     !insertmacro RadioButton ${EX6}
     !insertmacro EndRadioButtons

  !insertmacro SectionFlagIsSet ${EX} ${SF_SELECTED} selectedex noex
   selectedex:
    !insertmacro UnselectSection ${EX1}
    !insertmacro UnselectSection ${EX2}
    !insertmacro UnselectSection ${EX3}
    !insertmacro UnselectSection ${EX4}
    !insertmacro UnselectSection ${EX5}
    !insertmacro UnselectSection ${EX6}
    noex:
functionend
  


  

