I want to write an NSIS installer that scans a particular folder of the users file system, and adds a Section for each entry:
FindFirst $0 $1 $DOCUMENTS\Special
loop:
StrCmp $1 "" done
; Add section here!
FindNext $0 $1
Goto loop
done:
FindClose $0
However, I can't find a way to dynamically add sections. Is that possible?
The number of sections is set at compile time. It is possible to create hidden sections, so it is possible to make it seem dynamic if the maximum is known at compile time.
I don't know what you are doing with the files but I suggest you create a custom page with a listbox for the list of files...