mikeaoller
6th July 2009 12:04 UTC
Repair-Option
Hello to this community @1st!
Being new here and already having searched through all the available information, I couldn't find a feature other install systems recently more and more seem to have:
A Repair Functionality.
E.g.: A user accidentally deletes a file from an installed software and by this destroys the installation. With several other installation systems he could visit the software control panel applet, select the software and click a "Repair"-button.
AFAIK this is not possible with NSIS - please prove me wrong or show me a way to do something similar - that would be the cream topping for my already quite professional installer :)
Thank you very much,
Best Regards
Mike
Afrow UK
6th July 2009 12:59 UTC
Nothing is impossible with NSIS. Repair functionality is just not built in by default. It's a matter of displaying a custom nsDialogs page if you detect an installation and then skip the components page if Repair was chosen (and you'd probably need to remember which components had been selected during the install). It's quite a bit of work.
Stu
thek
6th July 2009 13:00 UTC
simple answer
Yes its possible.
1. you have to set the "norepair" flag to zero in the Uninstall section
see here "http://nsis.sourceforge.net/Docs/AppendixD.html#D.2"
2. you have to tell the "uninstaller" what he have to do when people want to repair
Afrow UK
6th July 2009 13:10 UTC
Well you can't tell the uninstaller to repair because you don't have the files stored in the uninstaller. You'd need to have the uninstall registry pointing to the original installer (a copy) instead and that can itself call the uninstaller if you choose Uninstall instead of Repair.
Stu
mikeaoller
6th July 2009 15:17 UTC
Hey guys,
thanks for your answers. In my case it would be even easier, because I wouldn't need file repair, and therefore no access to the installer files. I should have been clearer in my OP.
I only need the change/repair button to show up in the "Add or remove Programs" applet and an executable to be run when the button is clicked.
Does sb have an example?
Regards,
Mike
Afrow UK
6th July 2009 15:19 UTC
In which case look at point #1 in thek's post.
Stu