Graying out Section (define mandatory sections)

From NSIS Wiki

Author: ssp (talk, contrib)


Contents

[edit] Description

When creating my first installer recently I wondered if it was possible to define section mandatory, so that the user can not unselect them (e.g. needed components as shared libraries).

So I stumbled across SectionSetFlags

[edit] Procedure

Just add

    SectionSetFlags ${SEC0000} 17

to

Function .onInit.

17 by the way means SF_SELECTED & SF_RO, what tells windows select the checkbox before Section SEC0000 and make it read-only. To get to know all possible SF_ flags, look at the given reference.

[edit] References

[edit] Other methods

It's also possible to simply include the following in the section code:
SectionIn RO
--kichik 03:59, 8 September 2006 (PDT)
Personal tools
donate
ads