Skip to content
⌘ NSIS Forum Archive

Stupid Doubts with Sections

5 posts

darthvader#

Stupid Doubts with Sections

I have a stupid doubt(wierd problem or my understanding is wrong) I have this piece of code


Section "Desktop Wallpaper" SEC03

CopyFiles "$INSTDIR\wallpaper.bmp" "$WINDIR\Web\Wallpaper"

WriteRegStr HKCU "Control Panel\Desktop" "WallpaperStyle" "2"
WriteRegStr HKCU "Control Panel\Desktop" "Wallpaper" "$INSTDIR\wallpaper.bmp"

WriteRegStr HKCU ".DEFAULT\Control Panel\Desktop" "WallpaperStyle" "2"
WriteRegStr HKCU ".DEFAULT\Control Panel\Desktop" "Wallpaper" "$INSTDIR\wallpaper.bmp"

SectionEnd

Even though i do not select this section in components page it still gets executed. Does anybody have any idea regarding this problem?
Red Wine#
Does this happen with the basic example below?
OutFile "test.exe"
InstallDir "$PROGRAMFILES\test"
ShowInstDetails show

Page Components
Page Directory
Page InstFiles

Section "Section One" SEC01
DetailPrint "Hello from section One"
SectionEnd

Section "Section Two" SEC02
DetailPrint "Hello from section Two"
SectionEnd

Section "Section Three" SEC03
DetailPrint "Hello from section Three"
SectionEnd
darthvader#
Ok i guess i have found the problem. I have done a dumb mistake elsewhere in the script like this one

IntOp $3 $3 | ${SF_SELECTED}
SectionSetFlags ${SEC03} $3


Sorry for all the trouble.