Skip to content
⌘ NSIS Forum Archive

How to add dynamically sections into a sectionGroup

5 posts

bambou51#

How to add dynamically sections into a sectionGroup

I have a setup installing Websites.
During the uninstall process, I want to display the component page with a Website group in which I want to display a section for each Website installed.
I already have the list installed Websites, but I don't know how to add sections in a group within a loop.
bambou51#
No it has to be dynamic, because names of sections are known only when I do start the uninstall...
Maybe if I can rename sections or show/hide them from onInit I can expect a similar result... Can I do that ?
vitoco#
I'm trying the same: I have a lot of sections optionally installed. On uninstall, I want to display only installed sections in the list.

un.onInit searches for not installed ones, unselecting and renaming them, inserting a "-" at the begining, which is also displayed 😱

Am I missing something? un.onGUIInit?

Update: sections not installed are hidden if the new name is "" (empty string) instead of the leading "-" method 🤪 I think that this hidden attribute should be one of the section flags.

++Vitoco