We are working on converting the wiki to a static website controlled by markdown files in https://github.com/nsis-community. You can already see there how plug-ins will be posted. The end-user interface will still be a website but with a fresh coat of paint. Come meet us at Discord to talk about it.

Graying out Section (define mandatory sections)

From NSIS Wiki
Jump to navigationJump to search
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)