Archive: Installation Options


Installation Options
i was wondering since forever if it's possible to have two or more installation options. let's take the example of three options (minimal, standard, advanced). once you select one of them, the other two won't be selectable, each mode excludes the other two.

i'm sure that one can skip the modes that follow after the first one in the .nsi file, but how do i jump to the second option for instance?

please help and maybe paste a little example.

jan


Hi Jan,

I think you're looking for the components stuff. You need to make the sections and tell NSIS to which setting they belong, i.e. minimal, standard, or full. Example:

ComponentText 'Please choose the install type.'
; shows the install page.
InstType /ComponentsOnlyOnCustom /NoCustom
; that will [revent the individual sections from showing up.

InstType Minimal
; number 1
InstType Standard
; number 2
InstType Full
; number 3

Section ProgramFiles
SectionIn 1 2 3
; minimal, standard and full all need program files
...
SectionEnd

Section HelpFiles
SectionIn 2 3
...
SectionEnd

Section BonusStuff
SectionIn 3
...
SectionEnd
Hope this helps! :D

If you don't include the /ComponentsOnlyOnCustom part, the user will be able to see the actual sections, i.e. 'Program Files', 'Help Files', 'Bonus Stuff', but they won't be able to de/select them.


afaik that doesnt exclude the unselected sections. it allows multiple choice. what i want having 3 different installation-types, one selected excludes the other two.


As long as the Sections contain SectionIn commands, those sections without a particular InstType number will be excluded from that InstType.

If you'd like to post a dummy of your installation script, or the full thing even, I'll have a look at it and help you out.