Sections in a if condition
Hello,
I want something like this:
${If} $showsection == true
Section "mySection"
.
.
.
SectionEnd
>${EndIf}
But i cant compile it because ${If} is not valid outside functions...
Need help
thanks
aemik
Archive: Sections in a if condition
Sections in a if condition
Hello,
I want something like this:
${If} $showsection == true
Section "mySection"
.
.
.
SectionEnd
>${EndIf}
if you want this to be conditional on compilation, you can use !if. for conditions on runtime, have a look at this (or this example)
On the other hand, if you want it to be conditional upon some file/registry on the target machine, put code in the onInit function to hide the section.
To hide a section, you can change the section text to an empty string, or put a "-" in the front of the section string.
And also make sure you unselect the section as well as hide it.
Stu