ricky03
20th August 2009 10:35 UTC
Test on .oninit and change section flag
Hello,
I read a lot of topics, but i don't found a solution at my problem.
I want to do a test in the Function .onInit dependind the result, I want to unselect an put the flag readonly in one or more section and/or sectiongroup. How can I do that?
Thanks in advance
Regards
Anders
20th August 2009 15:02 UTC
See sections.nsh for helper macros
ricky03
20th August 2009 15:13 UTC
I have look, but it doesn't work. Could you make me an example?
Regards
ricky03
1st September 2009 15:10 UTC
Nobody can help me?
CrushBug
1st September 2009 16:54 UTC
Here is a section of an installer I use.
Section "WoW Mod #1 v0.7" WM1_id
SetOutPath "$0Interface\AddOns"
RMDir /r "$0Interface\AddOns\WoWMod1"
File /r "WoWMod1"
>SectionEnd
>Function .onInit
;find the registry entry for WoW
ReadRegStr$0 HKLM "SOFTWARE\Blizzard Entertainment\World of Warcraft" "InstallPath"
; check for which mods exist
;WoWMod1
${DirState} "$0Interface\AddOns\WoWMod1" $R0
${If} $R0 != -1
IntOp $R1${SF_SELECTED} | ${SF_RO}
SectionSetFlags "${WM1_id}" $R1
${EndIf}
>FunctionEnd ;onInit
>
If the directory exists then the section checkbox would be checked and set to Read Only.