Old 27th July 2015, 04:22   #1
sree
Junior Member
 
Join Date: Jan 2014
Posts: 3
Uninstall Page -How to have components selected by default

Uninstall Page -How to have components selected by default

I have couple of sections that show up in the Components page that i want to be selected by default to make it the default uninstallation process. If the user wants to keep a certain folder he will uncheck the box and that folder will not get deleted during the uninstallation process.

Similar to SectionIn and SectionIn ro etc is there similar ones for uninstall process.
sree is offline   Reply With Quote
Old 27th July 2015, 05:33   #2
JasonFriday13
Major Dude
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: New Zealand
Posts: 891
Did you try putting SectionIn in the uninstall section? Does it work?

If you are talking about remembering the sections that where installed, and uninstalling those sections, that requires more work.

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
NSIS 3 POSIX Ninja
Wiki Profile
JasonFriday13 is offline   Reply With Quote
Old 27th July 2015, 14:10   #3
sree
Junior Member
 
Join Date: Jan 2014
Posts: 3
SectionIn doesnt seem to work , if i put the "ro" , its setting the uneditable mode but not checking it by default.

I dont want the sections to be remembered during uninstall.


Summarizing again.

In the Uninstall -Component Page - I would like the components to be selected by default so that the default behavior is to uninstall the entire software, but if they want to retain certain pieces they will have to uncheck those boxes.

What i am trying to do is the give the user the option to "not uninstall" the license folder and uninstall the rest of the software. The default behavior will have both components selected for uninstall and if the user decides to "uncheck" the license folder, i will not uninstall that folder.

Hope this clarification helps.
sree is offline   Reply With Quote
Old 27th July 2015, 14:35   #4
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,296
What you are asking for is the default behavior:

Quote:
InstallDir "$Temp\TestInst"
Page Directory
Page Instfiles
UninstPage Components
UninstPage Instfiles

Section
SetOutPath $InstDir
WriteUninstaller "$InstDir\Uninst.exe"
SectionEnd

Section "un.Everything else"
Delete "$InstDir\MyApp.exe"
Delete "$InstDir\Uninst.exe"
RMDir $InstDir
SectionEnd

Section "un.License"
Delete "$InstDir\License.txt"
RMDir $InstDir
SectionEnd

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 27th July 2015, 17:43   #5
sree
Junior Member
 
Join Date: Jan 2014
Posts: 3
Thanks ...it triggered a bulb for me.

I was resetting the checkboxes with a macro for selection. When i did it barebones with what you suggested above. It worked perfectly.
sree is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump