|
|
#1 |
|
Junior Member
Join Date: May 2005
Posts: 36
|
blocking options in uninstaller
Hi:
Here is what i would like to do: I have 3 sections, a, b, c. In the uninstaller the user have the options to remove option, a, b or c...so what i would like to have is that whenever the user removes option a, and run the uninstaller again...option a should be marked as deleted so only b and c will appear. Same as if in the installer he only choose to install option a, when running the uninstaller option a should be the only one available to uninstall. Last, the uninstall.exe sits on the root directory(where folder a, b, c are) so whenever the user uninstall the last section and there is nothing else to uninstall, it should remove the uninstall.exe from the root directory as well. thanks. |
|
|
|
|
|
#2 |
|
Senior Member
Join Date: May 2005
Location: Taranaki, New Zealand
Posts: 400
|
Yeah, I was also wondering why this has not been a feature. But then again the original installer does the same job (I think).
|
|
|
|
|
|
#3 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,337
|
Write some values to registry specifying what's left and act accordingly in the uninstaller. To hide sections, use the macros in Include\Sections.nsh.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#4 |
|
Junior Member
Join Date: May 2005
Posts: 36
|
hidding secitions in uninstaller.
Can you give me an example of how to hide sections in the unistaller??
thanks. |
|
|
|
|
|
#5 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,203
|
Section "un.A Section" unSec01
... SectionEnd Function un.onInit !insertmacro UnselectSection ${unSec01} FunctionEnd -Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#6 |
|
Junior Member
Join Date: May 2005
Posts: 36
|
First of all. Thanks for all your help! It seems that I'm not getting what I wanna do tho. The piece of code you provided me only unchecked the option, but it doesn't hide it or block it(so the user cant select it again), so is there any way I can do that?
Also, How do can I keep tracking of what the user has installed/uninstalled and what not?? Using comparing with the registry? how can that be done?? Thanks. |
|
|
|
|
|
#7 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,203
|
Function un.onInit
SectionSetText ${unSec01} "" FunctionEnd Edit: As for your second question, use WriteRegStr in each section of your installer, e.g. WriteRegStr HKLM "Software\myApp\Installed" "A" "1" Then in un.onInit: code: -Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#8 |
|
Junior Member
Join Date: May 2005
Posts: 36
|
Thanks, it works!
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|