Archive: Install Type in Uninstaller...


Install Type in Uninstaller...
Hey everyone. I'm relatively familiar with NSIS, however, up until now I've only created simple installers.

The one I'm trying to create right now could have many different user options. It contains an exe inside of it which runs at the end of the installation, so what I need done is when they install the installer, based on which options they've chosen, this exe will run and compile scripts in directories of the options they've chosen. I think I have this part down, however, at uninstallation, this exe also has to run and uninstall certain files/directories based on the options they chose at the beginning.

So what I'm wondering is, can you use InstType in the Uninstall section and uninstall only the components that they've chosen to install during installation?

Thanks for any help.


Hi japheth,

I think this is something you might want to try:
At install save some Boolean variables (0 or 1) to the registry telling which options have been selected. Than at uninstall read the regsettings and perform the necessary tasks.

Good luck,
-Hendri.


Alright, please excuse my ignorance, but which instructions should I be using to set those boolean variables at install? And should there be a boolean instructions under each section?

Thanks again for any help.


The most easy way is to use the reigstry to save these settings. So use WriteRegStr at install and ReadRegStr at uninstall.

Good luck,
-Hendri.