Archive: SectionIn Ro Doen't Work


SectionIn Ro Doen't Work
  Hi,

I wrote a NSIS script that has multiple sections, I want all the sections to be installed so added "SectionIn RO" to all sections, this causes all components to be read only but some of them (usually 2) are unchecked (yet they are read only like the other sections).

My understanding of using "SectionIn RO" is that all components will be read only and checked forcing the installation of all of them.

So why is this happening, is it a bug in NSIS? are there any work arounds?

Another question is that I don't get InstType and how to use them, the documentation doesn't help much


Read only means just that, read only, so its state can't be changed. Executing sections that appear unchecked on the components page is insane, but if you want this, you could flip their state at runtime:


outfile test.exe

installdir $temptest

>!include Sections.nsh

page components
page instfiles

section first
sectionin ro
call EnableCrazy
DetailPrint hello
sectionend

section/o crazy1 SEC_C1
sectionin ro
DetailPrint crazy
sectionend

section/o crazy2 SEC_C2
sectionin ro
DetailPrint world
sectionend

>function EnableCrazy
>!insertmacro SelectSection ${SEC_C1}
!
insertmacro SelectSection ${SEC_C2}
>functionend
>