!include "Sections.nsh"

Name "UI Section Test"
OutFile "SectionTest.exe"

; Pages

Page components
Page instfiles

;--------------------------------

; Sections
Section "MyApp" MyApp
 MessageBox MB_OK "MyApp Installing"
 SectionGetFlags MyApp $0
 MessageBox MB_OK "MyApp: $0"
 SectionGetFlags AnotherApp $0
 MessageBox MB_OK "AnotherApp: $0"
SectionEnd

Section "AnotherApp" AnotherApp
 MessageBox MB_OK "AnotherApp Installing"
 SectionGetFlags MyApp $0
 MessageBox MB_OK "MyApp: $0"
 SectionGetFlags AnotherApp $0
 MessageBox MB_OK "AnotherApp: $0"
SectionEnd

Function .onSelChange
 SectionGetFlags MyApp $0
 MessageBox MB_OK "MyApp: $0"
 SectionGetFlags AnotherApp $0
 MessageBox MB_OK "AnotherApp: $0"
FunctionEnd

Function .onInit
 SectionSetFlags AnotherApp 1 ;@0, MyApp checkbox=unchecked. @1, MyApp checkbox=checked
FunctionEnd
