Archive: My first install section isn't executed. Why?


My first install section isn't executed. Why?
In my installer, I have a bunch of SubSections with Sections in them.

Now - before (above) them all, I have a Section "", "normal" Section.

This very first install-section is always jumped over during install! I have tried to make it copy a file that it extracts, to $DESKTOP but that doesn't happen, and I also have a messagebox MB_OK "Is this section executed?" within the Section, but that never pops up during install either. I have even tried to make the Section SectionIn RO with "Required" as the name, but even then the Section wasn't executed during install.


How can this happen? Any ideas?

If I remove that first Section, then the SubSection that is now below it, and all other Sections and SubSections are executed as they should.

I've just included a snippet here so you can see the first Section more in a context.

Here's a snippet of my code, changed names and such though; I've included the macros that come right before this Section:



; Uninstall macros:

!insertmacro MUI_UNPAGE_WELCOME
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE un.checksections
!define MUI_PAGE_HEADER_TEXT "Choose options:"
!insertmacro MUI_UNPAGE_COMPONENTS
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_UNPAGE_FINISH

!define MUI_ABORTWARNING
!define MUI_UNABORTWARNING
!insertmacro MUI_LANGUAGE "English"

;Install Sections:

Section ""
SetOutPath "$INSTDIR\Content"
File /r "INSTALL_PRESETS\Presets.ini"
messagebox MB_OK "Is this section executed?"
SectionEnd


SubSection "Blablah." SubSecBla
Section /o "Blah 1." Sec00
SetDetailsPrint textonly
DetailPrint "Extracting And Installing Files... Please Wait."
SetDetailsPrint none
SetOutPath "$INSTDIR\$INST_DIR"
File /r "Blah\blah1.txt"
File /r "Blah\blah2.txt"
File /r "Blah\blah3.txt"
File /r "Blah\blah4.txt"
File /r "Blah\blah5.txt"
ClearErrors
FileOpen $0 "$INSTDIR\Content\Presets.ini" a
FileSeek $0 -1 END
IfErrors done
FileWrite $0 "$\r$\nblah!$\r$\nblah!$\r$\nblah!$\r$\nblah!$\r$\n}"
FileClose $0
done:
SectionEnd

;MORE SECTIONS ARE IN THE SUBSECTION DOWN HERE; BUT I DOUBT THAT'S IMPORTANT, SO I'VE STOPPED THE CUT'n PASTE HERE.
SubSectionEnd



The first Section there has originally much more content in it, but I've tried to cut it down to the bare essentials in order to isolate what could cause it. Now there's almost nothing left in it, and it still isn't executed during install. Instead of Section "", I have also earlier tried calling it Section -section, but that didn't work either.

I'm using NSIS 2.10.

Thanks for any help.

I'll have to get back to this tomorrow; too late here now.

I removed the Section in question, but then it seemed like now the first SubSection wasn't executed; like it's going down the list. But I could be mistaken and perhaps I just didn't tick the first tickbox like I thought. So I'll have to look at that tomorrow. I'm not at home anymore(at work, nightshift).


Sounds like you set section flags with a wrong section symbol. For example:

SectionSetFlags ${sectionsymbol} ${SF_RO}
#...
Section blah sectionsymbol
SectionEnd
In this case, ${sectionsymbol} will be considered as zero, which is the index of the first section.