Archive: Dynamically show MUI_PAGE_STARTMENU?


Dynamically show MUI_PAGE_STARTMENU?
I have a MUI_PAGE_COMPONENTS page with a "Create startmenu chortcuts" checkbox. After that I would like to show a MUI_PAGE_STARTMENU page only if that checkbox checked.

Is this possible?


!define GetSectionSelection "!insertmacro GET_SECTION_SELECTION"
!macro GET_SECTION_SELECTION SECTION
Push $1
SectionGetFlags ${SECTION} $1
IntOp $1 $1 & 1
Exch $1
!macroend
[...]
!define MUI_STARTMENUPAGE_NODISABLE
!define MUI_PAGE_CUSTOMFUNCTION_PRE PreStartmenu
!insertmacro MUI_PAGE_STARTMENU "smid" $SMDIR
[...]
Section "$(lsSec_Startmenu)" siStartmenu
SectionEnd
[...]
Function PreStartmenu
${GetSectionSelection} ${siStartmenu}
Pop $0
StrCmp $0 0 0 +2
Abort
FunctionEnd

Thanks Comm@nder21. That worked beautifully!