Graying out Section (define mandatory sections): Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
No edit summary
 
 
(2 intermediate revisions by 2 users not shown)
Line 5: Line 5:


So I stumbled across SectionSetFlags
So I stumbled across SectionSetFlags


== Procedure ==
== Procedure ==
Line 22: Line 20:
* Manual: 4.9.13.1 (Section Management) at http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.13
* 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:<highlight-nsis>
SectionIn RO
</highlight-nsis>--[[User:Kichik|kichik]] 03:59, 8 September 2006 (PDT)


[[Category:Code Examples]]
[[Category:Code Examples]]

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

Other methods

It's also possible to simply include the following in the section code:

SectionIn RO

--kichik 03:59, 8 September 2006 (PDT)