Archive: populate sections at runtime from an external file


populate sections at runtime from an external file
  Is it possible to populate sections from an external file at run time, so that these sections can be changed dynamically "outside" of the compiled installer?

For example, I know the following wont work, but hopefully explains the concept:


SectionGroup "Group" Sect

>!include "sectionslist.txt"
>SectionGroupEnd
>
And have sectionslist.txt file populate the sections:


Section /o "Option1" Option1

Some stuff
SectionEnd

Section/o "Option2" Option2
Some other stuff
SectionEnd
>

No. !include is a compiletime command, and although it's possible to extract the precompiled script file from an NSIS installer exe, you cannot as far as I know add script to an NSIS installer after it has been compiled.

What you can do is run external executables, or even makensis to compile a script into an installer at runtime.


Something like this would require an IIS server with NSIS installed to accept an HTTP request and then to respond with a built installation executable. I have seen this done and it is very neat!

Stu