Archive: LogicLib Question


LogicLib Question
Hello,

I want my installation program to check on run-time if a certain program is installed or not. To do so, I am using the ReadRegStr command to check if a Regkey associated with that said program is present or not. If it does find that Regkey, it will then associate its full path to a variable.


I have multiple install sections that I would like to show up in the components page ONLY if that same variable has another value than an empty string. Thing that can easily be made with an IF conditional run-time command... And here's the problem: The only way I seem to know to actually call those run-time commands is by using the Logiclib. However, they can only be used inside sections, which makes it impossible to make those sections appear in the components page, since I can't even control them with conditions. Any help will be greatly appreciated.


You could control section visibility on runtime by changing their name. Sections with empty names will not show up on the components page. Use SectionSetText to set the section's name. See Include\Sections.nsh for useful section handling macros.


Thanks for the quick reply! One more question if you dont mind: How can I make a page (such as the license page, for example) conditionally appear depending on a variable's value? Thanks again.


I think this is actually a very difficult thing to do.


The FAQ has your answer.

http://nsis.sourceforge.net/Skipping_Pages