I have read all the tips here in the forum concerning my problem, but couldn't solve it yet.
I have 2 SectionGroups. The first one should be completely hidden depending on some values checked/ defined in the .onInit function.
But no matter what I try I did not get the SectionGroup hidden - it is always shown (the Sections inside are hidden as they should).
I have read (and understood) about clearing the hidden SF_SECGRPEND flag.
Do I overlook something?
SectionGroup /e "Reset Config Section Group" SecGrpResetConfig
Section "Delete Config File Section" SecDeleteConfigFile
SectionEnd
;Delete chart DB (CHRTLIST.DAT)
Section "Delete ChartDB Section" SecDeleteChartDB
SectionEnd
;Delete SENC directory
Section "Delete SENC Section" SecDeleteSENC
SectionEnd
SectionGroupEnd
;Shortcut Section
SectionGroup /e "Shortcuts Section Group" SecGrpShortcuts
Section "Startmenu Shortcut Section" SecShortcutStartmenu
;Start Menu
SectionEnd
Section "Desktop Shortcut Section" SecShortcutDesktop
;Desktop
SectionEnd
SectionGroupEnd
Function .onInit
${If} $CONFIG_EXISTS != 1
${OrIf} $CONFIG_EMPTY == 1
!insertmacro ClearSectionFlag ${SecDeleteConfigFile} ${SF_SELECTED}
SectionSetText ${SecDeleteConfigFile} ""
!insertmacro ClearSectionFlag ${SecDeleteChartDB} ${SF_SELECTED}
SectionSetText ${SecDeleteChartDB} ""
!insertmacro ClearSectionFlag ${SecDeleteSENC} ${SF_SELECTED}
SectionSetText ${SecDeleteSENC} ""
!insertmacro ClearSectionFlag ${SecGrpResetConfig} ${SF_SECGRP}
!insertmacro ClearSectionFlag ${SecGrpResetConfig} ${SF_SELECTED}
SectionSetFlags ${SecGrpResetConfig} 0
SectionSetText ${SecGrpResetConfig} ""
IntOp $0 ${SecDeleteSENC} + 1
!insertmacro ClearSectionFlag $0 ${SF_SECGRPEND}
SectionSetText $0 ""
;MessageBox MB_OK|MB_ICONEXCLAMATION "Macro S0: $0" ;#DEBUG
${EndIf}
FunctionEnd I am using version 2.46 - Unicode with the ModernUI2 and therefor MUI_PAGE_COMPONENTS.Any help is very much appreciated! 🙂
Thanks,
Gunther