Archive: un.installers...


un.installers...
Hi All,

I'm getting some more experience with NSIS and I have a need to easily create an uninstaller that corresponds closely to an installer and what the user chose to install. I've read through many of the forum posts, documentation, and I haven't answered my own simple question:

If I create an uninstaller section that has the same name as an installer section say 'blorg', although prefixed with the requisite 'un.', and the user chooses 'blorg' to be installed in the components list, will 'un.blorg' be included in the uninstaller? Or do ALL un. sections get put into the uninstaller?

If it isn't already in the features list, I think it would be a wonderfully simplifying feature to write out an uninstaller that corresponds to the installed sections of the same name (without the 'un.' prefix').

Is this what happens already?

Thanks.


If I create an uninstaller section that has the same name as an installer section say 'blorg', although prefixed with the requisite 'un.', and the user chooses 'blorg' to be installed in the components list, will 'un.blorg' be included in the uninstaller? Or do ALL un. sections get put into the uninstaller?
Every section is executed if you don't supply a components page for the uninstaller. This page is where the user chooses which sections to uninstall.

The installer needs to tell the uninstaller which sections it installed, because an uninstall program is a separated program from the install program. You can use registry, ini files, and etc. to supply that information.

If it isn't already in the features list, I think it would be a wonderfully simplifying feature to write out an uninstaller that corresponds to the installed sections of the same name (without the 'un.' prefix').
This usually isn't good because some people might need to customize more the uninstallers, and so, this would make NSIS bigger... and I don't like when that happens...

You could do this in compile-time by creating another NSIS script that writes instructions for both installer and uninstaller.