Archive: show custompage when in subsection at least one section is selected


show custompage when in subsection at least one section is selected
i'm using custompage and i would like it to be shown when whole subsection (SubSection "AutoVaru" SecVaru) or one of sectionst of subsection(4example: Section "Esmaspaev" SecEvaru) is selected. I have read some example scripts from NSIS forum, but it seems to me, that it doesn't work when using subsections(have i misunderstood something or doing wrong). All exept not showing custompage works fine. that's sometihing i have in my script:

#### a part of my script

ReserveFile "varukoopia.ini"
Function SetVinstall

;just some names of sections that i have. i have all other needed stuff also.
SubSection "AutoVaru" SecVaru
Section "Esmaspaev" SecEvaru
Section "Teisipaev" SecTvaru

;example form NSIS archive:

!include "Sections.nsh"
;Page custom CustomPage ;original example
Page custom SetVinstall "" ;added in my script
Function CustomPage
; SectionGetFlags ${Section_Name} $R0 ;original
SectionGetFlags ${AutoVaru} $R0 ;added in my script
IntOp $R0 $R0 & ${SF_SELECTED}
IntCmp $R0 ${SF_SELECTED} show
Abort
show:
;If not using Modern UI use InstallOptions::dialog "iofile.ini"
!insertmacro MUI_HEADER_TEXT "text" "subtext"
; !insertmacro MUI_INSTALLOPTIONS_DISPLAY "iofile.ini" ;original
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "varukoopia.ini" ;added in my script
FunctionEnd
####

i'm using Modern UI

somebody please help me to correct my script :igor:
tnx


AutoVaru is the name of the section according to your script, not the name of its define (SecVaru) as it should be. When testing a subsection you should check for the SF_PSELECTED too, it will tell you if the subsection has any section selected under it.

See the following page for more information:
http://nsis.sourceforge.net/archive/....php?pageid=89


dooh...i now saw, that i'm already using $R0, but may i change $R0's to different variable for example $r0, on the following lines
SectionGetFlags ${AutoVaru} $R0
IntOp $R0 $R0 & ${SF_SELECTED}
IntCmp $R0 ${SF_SELECTED} show
, or on that case i have to change some more lines in Sections.nsh file?