Old 30th May 2007, 20:27   #1
Dave412
Junior Member
 
Join Date: May 2007
Posts: 3
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.
Dave412 is offline   Reply With Quote
Old 30th May 2007, 20:39   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
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.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 30th May 2007, 21:27   #3
Dave412
Junior Member
 
Join Date: May 2007
Posts: 3
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.
Dave412 is offline   Reply With Quote
Old 30th May 2007, 21:33   #4
jackkoho
Member
 
Join Date: Oct 2006
Posts: 70
I think this is actually a very difficult thing to do.
jackkoho is offline   Reply With Quote
Old 30th May 2007, 21:40   #5
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
The FAQ has your answer.

http://nsis.sourceforge.net/Skipping_Pages

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump