-2

I am a newbie in NSIS. I need some help regarding the MUI Components page. I am adding 3 section Group and different sections inside the Section Groups. I need to do different actions based on the user selection. Users have the options to select multiple options. So can anyone please help me with a sample code which is having more than 3 sections and verifying the user selection of those options and based on that displaying different message boxes

Machavity
  • 30,841
  • 27
  • 92
  • 100
Saanch
  • 1,814
  • 1
  • 24
  • 38
  • 2
    You just do the normal stuff in the sections and they get run if they're selected... if that's not all you're asking about, please clarify your question. – Chris Morgan Jan 11 '12 at 13:39

1 Answers1

2

It is very unclear to me what your real goal is but checking section states can be done like this:

!include LogicLib.nsh

page components
page instfiles

SectionGroup /e "Group 1"
Section "G1S1" SEC_G1S1
SectionEnd
Section /o "G1S2" SEC_G1S2
SectionEnd
SectionGroupEnd

SectionGroup /e "Group 2"
Section /o "G2S1" SEC_G2S1
SectionEnd
Section "G2S2" SEC_G2S2
SectionEnd
SectionGroupEnd

Section -Hidden
${If} ${SectionIsSelected} ${SEC_G1S1}
    MessageBox mb_ok "G1S1 is selected"
${EndIf}
${If} ${SectionIsSelected} ${SEC_G1S2}
    MessageBox mb_ok "G1S2 is selected"
${EndIf}
# Check the other sections here ...
SectionEnd
Anders
  • 97,548
  • 12
  • 110
  • 164