View Full Version : Uninstaller by section
5th October 2009, 11:37
I would like to have a uninstaller on each section.
Section 1 "Section1"
Section 2 "Section2"
When I want to launch the Uninst1.exe then un.Section1 is executed but also the un.Section2.
And I don't want that how is it possible to change that please ?
6th October 2009, 08:45
Nobody has got an idea or a workaround ?
I'm just starting to discover NSIS so i am perhaps on a wrong way :)
6th October 2009, 09:03
There is no simple way to do this. The most straight-forward method I can think of is writing somewhere (registry, ini file) which sections were installed, and then reading that info in your uninstaller.
6th October 2009, 09:03
I made an installer that installs a package, containing 3 different applications. It is clear that it must be possible to uninstall only one of them. My idea is the following. I create only one uninstaller, but it accepts a parameter from the command line. The parameter is the name of the application that must be uninstalled (or several names). When I write the uninstall information to the registry, I put also the corresponding parameter that must be passed to the uninstaller. In function un.onInit you have to check and get the parameters on from the command line. You can do this with the macro un.GetParameters from FileFunc.nsh. Everything works without any problems.
6th October 2009, 09:21
There is one problem with this approach: The user might run uninstall.exe manually, in which case no parameters would be supplied.
Since you're already writing to the registry, you might as well create some regkeys of your own, to identify which applications have been installed and which haven't.
6th October 2009, 09:43
If the unuinstaller is started manually, it shows a component dialog (I forgot to tell that in another case it is started in silent mode). In this dialog you can see all supported applications and these once which are already uninstalled are inactive. So you can select manually what do you want to uninstall. After the last application is uninstalled, the uninstaller can delete itself too... It works so...
6th October 2009, 11:50
Hi Msg and TrifonovS,
Thank you very much for your advice, it is very helpfull for me.
I have now an idea of what to do :)
6th October 2009, 12:53
I didn't see that it was possible to have page for uninstall ...
So I have just put
And the Section "un.Section1" is executed.
6th October 2009, 13:58
Yes, the most of the pages that can be used in the installer have uninstaller versions...
vBulletin® v3.8.6, Copyright ©2000-2013, Jelsoft Enterprises Ltd.