is this the right way to do it? it works, but i can tell by doing a mb_ok that it's doing this literally EVERY NEXT PAGE.
i also observed when i would print the values of $0/$1/$2/$3 if the components were selected they would yield 3/5/5/1 respectively. what is with the different values?
while my solution works, it is not elegant in the fact that it warns the user, they click ok, and then their screen shows all their options unselected - but they're actually all forcefully selected. going back a screen and returning will show this. right now a developer install has all 4 components selected. if they unselect all 4 and attempt to install, it warns them, then puts them back at the component selection screen - with all the checkboxes visibly unchecked and 'custom' selected as the install type.
so...
what's with the numbers?
is this the right way to do this?
if this is the right way to do this, how do i 'refresh' the screen to show the components have all been forcefully selected?
Function .onNextPage
SectionGetFlags 1 $0
SectionGetFlags 2 $1
SectionGetFlags 3 $2
SectionGetFlags 4 $3
IntCmp 0 $0 end unselected1 end
unselected1:
IntCmp 0 $1 end unselected2 end
unselected2:
IntCmp 0 $2 end unselected3 end
unselected3:
IntCmp 0 $3 end unselected4 end
unselected4:
MessageBox MB_OK|MB_ICONSTOP "You must select at least 1 component!"
SectionSetFlags 1 0x80000000
SectionSetFlags 2 0x80000000
SectionSetFlags 3 0x80000000
SectionSetFlags 4 0x80000000
abort 0
end:
FunctionEnd