Graying out Section (define mandatory sections): Difference between revisions
From NSIS Wiki
Jump to navigationJump to search
(simpler method) |
|||
(One intermediate revision by the same user not shown) | |||
Line 5: | Line 5: | ||
So I stumbled across SectionSetFlags | So I stumbled across SectionSetFlags | ||
== Procedure == | == Procedure == |
Latest revision as of 10:23, 28 March 2009
Author: ssp (talk, contrib) |
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
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.
References
- Manual: 4.9.13.1 (Section Management) at http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.13
Other methods
It's also possible to simply include the following in the section code:
SectionIn RO
--kichik 03:59, 8 September 2006 (PDT)