Hello!
I'm trying to use SectionIsSelected from Sections.nsh, to write some config files when certain sections have been selected. I'm executing this code inside my first section:
${If} ${SectionIsSelected} ${SEC03}
WriteIniStr DIR GROUP KEY VALUE
WriteIniStr DIR GROUP KEY VALUE2
WriteIniStr DIR GROUP KEY VALUE3
${EndIf}
When i compile i get the warning:
"warning: unknown variable/constant "{SEC03}" detected, ignoring (macro:_SectionFlagIsSet:2)
How can i fix this? I've tried using the .selChange or what's it's name. but problem is that the config file i want to write to haven't been installed at this point.
Regards,
Simon
SectionIsSelected in section?
6 posts
First you need to declare SEC03 constant. So use
. After that use it.Section "Name" SEC03
Too bad. This means i can't do this when my section is declared before the section i wan't to check.
You can use Section Index to set flag, If i'm wrong 2 indicate to this section, so
${If} ${SectionIsSelected} 2
WriteIniStr DIR GROUP KEY VALUE
WriteIniStr DIR GROUP KEY VALUE2
WriteIniStr DIR GROUP KEY VALUE3
${EndIf}
there is no need to Name Sections
${If} ${SectionIsSelected} 2
WriteIniStr DIR GROUP KEY VALUE
WriteIniStr DIR GROUP KEY VALUE2
WriteIniStr DIR GROUP KEY VALUE3
${EndIf}
there is no need to Name Sections
This mean you can set Section Description with Numbers
Ok, got it working.