Archive: Repair option


Repair option
Can you have a 'repair' option in a setup generated with NSIS? When uninstalling people seem to appreciate that option.


You can make a flexible script that just reinstalls the software if it is damaged. Save your installdir to the reg and use InstDirRegKey to find the original installdir. Then using InstOpts (if the RegKey is not empty, otherwise it is a new installation) you can ask the user whether to reinstall the software or repair it (where you check settings with the script and set them to the right values if necessary).
So the trick: use InstallOptions!

Good luck, greetz,
-Hendri.


Thanks for the fast reply! As far as I can tell the InstallOptions.dll displays a dialog, is it possible to integrate the logic into the setup/uninstall window? So, can you have checkboxes and radiobuttons in the NSIS installer?

Regards, Pragmaxe.


Indeed, for an example see this thread.

Good luck,
-Hendri.


Here's an example script for what you want to do. It creates an installer that (if the program is already installed) ask to repair or reinstall the program. If you also save the $INSTDIR to the registry, there is no problem to find the program and repair/reinstall it. You can even create an option to uninstall the program. Just create an uninstaller which can be run silently and run it when a user chooses to uninstall in the installer option screen.

Have fun programming it! :)

Good luck,
-Hendri.


Thank you very much!

Regards, Pragmaxe.


And for a InstallOptions GUI, check out http://www.morphedmedia.com/software.asp

-Duane