Archive: Sectionflags 1 select deselect the other


Sectionflags 1 select deselect the other
Hi pros,

I went around the forum and read some which cannot get an answer. I currently using this method but it will only work after clicking 2 to 3 times on the checkboxes my question now is how could I make it work immediately when it appears

Section Main SEC0000
SectionEnd

Section Main2 SEC0001
SectionEnd

Function .onSelChange
SectionGetFlags ${SEC0000} $R0
StrCmp $R0 ${SF_SELECTED} 0 +3
SectionGetFlags ${SEC0001} $R0
StrCmp $R0 ${SF_SELECTED} +4
GetDlgItem $R0 $HWNDPARENT 1
EnableWindow $R0 1
Goto +3
GetDlgItem $R0 $HWNDPARENT 1
EnableWindow $R0 0
InitPluginsDir
FunctionEnd
here's what I trying to do.

1. Only 1 section can be selected, if two section being selected the install button will not appear.

2. If no section is being selected the install button will not appear

could someone help me adjust the selection I tried all ways to make but still cannot understand the jumps.

thanks for everyone help in the past few weeks

Hi pros,

I solved the problem myself again, the hints is all in the one-section.nsi example thanks alot and have a nice day.