Archive: Conditional Components


Conditional Components
I am trying to create a installer that can be installed in two ways. One way is to install everything(single server), another would be to split onto two machines(split server).

For the split server option, the user will have to further select whether he is installing the internal or the external portion.

So my question is, how can I create sections is such a way that when on Modern UI's components page, the components can be selected only in certain ways?

i.e.
- when single server section is selected, no other can
- when split server is selected, one of internal or external must be selected. not both. and single server can not be selected

I have searched the forums but wasn't able to find anything I can use.

Any help is much appreciated!


You can use install types.
In this case you need to create 3 install types: Single server, Split (internal), Split (external).


InstType /NOCUSTOM
InstType "Single server"
InstType "Split (internal)"
InstType "Split (external)"
...
Section "Single server"
SectionIn 1
...
SetionEnd

Section "Split (internal)"
SectionIn 2
...
SetionEnd

Section "Split (external)"
SectionIn 3
...
SetionEnd

In this way user can choose one of the pre-defined installation type which select needed sections.

Second way - use LogicLib and logic expressions.

hmm, forum search seems to be bad....

see sections.nsh (include folder) and the one-section.nsi example


Thanks Guys!

InstType and SectionIn was the ticket!