Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I make a section in NSIS unchecked by default

Tags:

nsis

I have a NSIS installer, here I have some components that user can choose to install:

Section "Modules" SecModules
  SetOutPath "$INSTDIR"
  CreateDirectory $INSTDIR\modules
  ...
SectionEnd

Section "Freenode util" SecFreenode
  SetOutPath "$INSTDIR"
  CreateDirectory $INSTDIR\modules
  ...
SectionEnd

how can I make the second one unchecked? By default they all are checked

like image 408
Petr Avatar asked Apr 17 '13 09:04

Petr


People also ask

What is NSi script?

Nullsoft Scriptable Install System (NSIS) is a script-driven installer authoring tool for Microsoft Windows backed by Nullsoft, the creators of Winamp. NSIS is released under a combination of free software licenses, primarily the zlib license.

How do you compile NSIS?

2.4 Compiler It reads your script, parses it and creates an installer for you. To compile you can right-click your . nsi file and select Compile NSIS Script. This will cause MakeNSISW, the NSIS Compiler Interface, to launch and call MakeNSIS to compile your script.


2 Answers

; unselected because it is /o
Section /o "Modules" SecModules
  SetOutPath "$INSTDIR"
  CreateDirectory $INSTDIR\modules
  ...
SectionEnd

; selected
Section "Freenode util" SecFreenode
  SetOutPath "$INSTDIR"
  CreateDirectory $INSTDIR\modules
  ...
SectionEnd
like image 67
Petr Avatar answered Oct 24 '22 16:10

Petr


Apart from Section /o, you can also use SectionIn to control default sections. The latter might be useful if you have several sections and you plan to offer several installation types (see InstType). Lastly, you can control the state of a section based on logic, using SectionSetFlags.

like image 21
idleberg Avatar answered Oct 24 '22 16:10

idleberg