PDA

View Full Version : Show a second Install Directory page conditionally


DropF
23rd June 2003, 23:48
Hi,

I need some help: I would like to display a second Install Directory page only if a section is selected.

I'm able to display an InstallOptions dialog only if a section has been selected. I'm also able to show a second Install Directory page whenever. But I don't know how to mix the both :D.

Some detailed code would be nice, because I'm a beginner.

Thank you :up:

n0On3
24th June 2003, 03:23
I use this to skip the components page when desired:

Page Directory
Page Components NoComp
Page InstFiles

Function NoComp
ClearErrors
ReadRegStr $R6 HKLM "Software\NAME" "SKIP"
IfErrors "Cont"
Abort
Cont:
FunctionEnd


In fact, I read this in NSIS Documentation.

I am pretty sure you can tweak it to meet your requirements. If not, try reading the documentation, or posting again (attaching script preferably).

DropF
25th June 2003, 10:35
That's ok, my problem is resolved. In fact, I thought the function "Abort" would stop the installer, and not skip a page. So the solution is to always skip the second directory page (with "Abort"), and show it only if the good section has been selected.

Thank you ;)

n0On3
25th June 2003, 16:41
yes, I asked the same.

'Abort' stops installer in a section, but in this function skips the page.