Archive: 2 or 3 or Neither


2 or 3 or Neither
Well "The more I know the more I find out I don't know".

Never saw an Example on this. I'll try my best to
explain my problem. If you can help me please do
so.

Take in mind these sections.


Section "Section one" Section1
SectionEnd

Section "Section two" Section2
SectionEnd

Section /o "Section three" Section3
SectionEnd

Section "Section four" Section4
SectionEnd

Section "Section five" Section5
SectionEnd

Ok Function .onSelChange should work for this.
I would want it to check every time something
is selected or unselected.

I simply need to say when Section three is selected
unselect Section two and when the user selects
section two it will unselect section three.

This code does that.

Function .onSelChange
!insertmacro StartRadioButtons $1
!insertmacro RadioButton ${Section2}
!insertmacro RadioButton ${section3}
!insertmacro EndRadioButtons
FunctionEnd


It made things happen I never intended. After clicking any
check box it would unselect section one. Also it wouldn't
let me unselect section two and section three to not install
either one. It made section two and three lock in to either
one or the other. It also on first click on Section three it
doesn't unselect Section two.

Reasons I have two installations and I can only allow one
or the other. I still want the user to be able to decide not
to install both Sections two and three.

Does anyone know of better code?

Can this be done with SectionSetFlags and SectionGetFlags
with some sort of "if" Statement some how?

Please let me know if you need me to explain more.
I have attached a script that replicates my problem.

-MichaelFlya-

I think this code help you:

Function .onInit
StrCpy $1 ${Section2}
FunctionEnd

Thanks Glory_Man,

I knew that was part of it. I just didn't include it for
some reason. That helps a every issue actually, but
one. The only thing I need now is to have it to where
I can unselect them both, so the user will be able to
choose to not install either one.


-MichaelFlya-