Search code examples
nsis

Can I have optional sections in an NSIS UNinstaller?


When building my installer, I can let the user choose which sections to install by calling

!insertmacro MUI_PAGE_COMPONENTS

How can I provide similar functionality in the uninstaller?

I know how to make the sections themselves (thanks to the answers for this question). I just don't know how to let the user choose which of these sections to uninstall.


Solution

  • You do the same things as in the installer, you just need the correct uninstaller prefix:

    MUI_UNPAGE_COMPONENTS

    and

    Section /o un.optional
    SectionEnd