Archive: Section Lists


Section Lists
Hello Folks,

I'm trying to build an installation with a summary page using NSIS. Although I did get it working, I would like to enhance it a bit (and make it a bit more portable too). The problem is that I can't find a way to detect the sections that are available in an installation automatically (on compile time would be the best I guess).

Basically what I'm looking for is some code which checks the current installation and loops through all Sections. Then what it must do, is simply add a string (containing the section's name) if the selection is checked and visible on the components page. For layout improvement, I guess it would also be useful at what depth in the tree (in case of subsections) the section is, so you can add a number of spaces before the text and indent it that way.

As said, I am able to do it now (and the whole summary page is working too), but it's quite installation specific. The code must now be written separately for each section (with hardcoded section names etc) which does make it look a bit ugly. If you add or remove a section to the installation, you'll also have to adjust the function etc...

On another (off-topic) note: I was wondering if the Finnish language file for the MUI has been updated yet (because my installation will also be in Finnish)? I didn't find an updated file in the latest snapshot though... If not, what strings are missing (on what pages etc.)?

Thank you for your help!


SectionGetFlags, SectionGetInstTypes, etc. will set the error flag if given a section which is out of range. You can use that to loop through all sections until the error flag is set.

For depth, you can check for the SF_SUBSEC and SF_SUBSECEND flags in that loop.


Thanks a lot for your help, I should be able to do the rest from there :) I did read something like that in the documentation but I didn't understand it completely I guess. Thanks again :)