|
|
#1 | |
|
Junior Member
|
Loops and Sections.
I'm trying to make a code that checks the registry for information, such as the name and the location of files. How can I make the installer create a section for each key it finds, with the name ripped from the registry?
My code currectly: Quote:
Thanks, Database |
|
|
|
|
|
|
#2 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
You cannot create Sections dynamically.
You could instead, however, display a list with the EmbeddedLists plugin (on Wiki). -Stu |
|
|
|
|
|
#3 |
|
Junior Member
|
Thanks, but this probably won't help. What I am trying to do as a whole, is set up an installer to detect new files on a server, and offer them for download.
Any ideas? Thanks, Database |
|
|
|
|
|
#4 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
You could create a pool of invisible sections that you'd use show for each registry key. The number of sections will be limited but you'll be able to dynamically "create" sections.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#5 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
I've done this many a time. I wrote a number of programs in NSIS with dialogs for selecting files for download. The list of files was stored as plain text on a server and downloaded when the program was ran.
I always just used an InstallOptions list box control, but for future projects I can use EmbeddedLists either with a checked list box, or a tree view control with check boxes (almost identical to the one on the NSIS Components page). -Stu |
|
|
|
|
|
#6 |
|
Junior Member
|
Wow, very useful. The problem is that I need the file with the file locations to be seperate from the installer, so it can be easily updated every time the installer is run.
|
|
|
|
|
|
#7 |
|
Junior Member
|
Another thing: Can you elaborate on how you did the list of files, and how you got the installer to read them?
|
|
|
|
|
|
#8 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
List of files:
http://hmd.hostileintent.org/swupdat...s/swupdata.txt To read from the file, used FileOpen, FileRead and FileClose. Files are downloaded with the InetLoad plugin. Edit: this is called SwUpdata, which is at http://swupdata.sf.net -Stu |
|
|
|
|
|
#9 |
|
Junior Member
|
Wow, very cool. I'm using an INI file again now... I'll probably do the same thing as you've done
![]() -Data |
|
|
|
|
|
#10 | |
|
Junior Member
|
OK, I'm trying to create a loop for this, so it loops through and propogates the sections with the names, descriptinos, and locations of the files.
This is the code so far for the whole program: Quote:
|
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|