Skip to content
⌘ NSIS Forum Archive

Components Control

4 posts

dilbertz#

Components Control

Greetings
This is a really simple question since I'm a complete beginner.
I have two sections, both selectable.
In the Uninstaller section I'd like to know which sections were selected, in order to uninstall the appropriate parts for each selected section.
I tried to use global variable (getting diffrent value in each section), or using SectionGetFlags and it always uninstalled both sections' parts, regardless of my choice.
How can I do it.
Thanking you all.
Dilbertz
Red Wine#
Already discussed several times, here is a recent similar thread,

Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.
dilbertz#
Hi
Thanks for the quick answer.
The registry trick works of course.
Found it few hours ago but it still seems weird that there is no other way to connect between installer sections and uninstall section.
By the same token you can open a file in each installer section and check its existence in the uninstall section.
This is clumsy as well.
thanks again.
Dilbertz
Red Wine#
You control the script, you control the installer, the ways you may do it, are endless 😉
For instance, you may combine the registry thing with a components uninstall page which should read the registry and turns installed sections as checked ready for uninstall.
Doing that, you're offering the ability to uninstall parts of your software or uninstall completely.
For my opinion these are flexible and pro capabilities offered by NSIS.