Skip to content
⌘ NSIS Forum Archive

UnselectSection is NOT working

5 posts

thoste#

UnselectSection is NOT working

According to some recommendations I code the following statements:

!include Sections.nsh
....
Section "first data.txt"
!insertmacro UnselectSection "first data.txt"
....
SectionEnd

If I run the installer afterwards the Section is still checked !!!
(a check is in the box in front of the section in the selction list). But I want to uncheck it by default.

Again: How do I do it?
Joost Verburg#
Add a define nameto the Section command:

Section "first data.dat" firstdata

and use !insertmacro UnselectSection ${firstdata}
kichik#
That's because you called this function inside the section. If you want it to be unchecked from the begning use it in .onInit. If you want to dynamically [un]check it use it in .onSelChange. Please be aware that there is a typo in the SelectSection macro. On line 22 there is a & sign instead of a | sign.