Archive: Invisible uninstall section.


Invisible uninstall section.
In the uninstaller part of my script, I need to have one invisible uninstall section before the 'normal' uninstall sections, and then one invisible uninstall section after the 'normal' ones.

So I tried this:

Section -"un.Section1"

and

Section -"un.Section2"

before and after the other uninstall sections.


They are invisible, but the problem turned out to be that at least the Section -"un.Section2" section was executed during install. I guess they both were, but I noticed this because of a typo in the un.Section2, which made it put a file to '$INSTDIR\$INSTDIR'.

-So why did it put the file there(execute the section) during install, and how do I make invisible uninstall sections if this is not the way to do it?

The other, 'normal' uninstall section names look like for instance:

Section "un.Textfiles" unSec03

and they only get executed during uninstall.

I'm using NSIS 2.10.


Remove the quotes.
Section -un.Section1
Section -un.Section2


or keep the quotes, but move the minus sign inside;
Section "-un.Hidden Uninstall Section"
SectionEnd


Ooops - forgot to say 'thank you'.
-So thank you. :)