Archive: How to uncheck/disable sections in selection list ?


How to uncheck/disable sections in selection list ?
I have several sections in a successfully working NSIS script.

However, all of the sections are listed during the installation
with a check in a box before the section name.

For certain sections I don't want that these sections should be
checked by default (!). Read: the check in the tiny box should
not appear. However the user should have the option to check these boxes manually.

How do I code this ?

Thx
Thomas


If you are using install types, then the first install type specifies what is selected by default (via the "InSection n" instructions). There isn't a way to select another install type trough scripting (yet).

IMHO it should be possible to use "InSection n" without any "InstType" instructions to set what is selected and deselected by default.
If this isn't possible, then I suggest that you use a "section select/deselect"-script (somewhere on this forum and in the archives, I think) before showing the component selection page. But be carefull: Let the script do this only once (on initialization, for example), or else the sections will be selected/deselected every time when the user clicks '< Back' and 'Next >' from the component page.


Include\Sections.nsh (use !include Sections.nsh to include in your script) contains macros to select/deselect sections. Be aware though that the macro to select a section is not working right on out of the box b3 (on CVS it does). To fix that replace & with | on line 22.