Archive: Web file install possible?


Web file install possible?
Hi,

Is the following scenario possible to author using NSIS?

User starts an update wizard which first lists available
servers. User selects a server and wizard lists available
files. User selects files to be downloaded from the server
and wizard finishes after that.

Markus


Yes, it is possible with the combination of NSISdl and InstallOptions.


Thanks for pointing me to right direction. However, after getting to know InstallOptions I don't think it is very suitable for my purpose.

Offering the list of download servers in a listbox still works but I cannot come up with a way to show the available files in a list so that user can select them (preferably using check boxes) and then install them. Can I create the list of components dynamically for MUI_PAGE_COMPONENTS page? That page pretty much has the functionality but the list of files will be generated dynamically, on the fly.


Oh, the TreeView control... I'm trying to add this control to InstallOptionsEx (see the thread with the same name) but it's not available now. I'm doing other changes to this plugin, so it will not be available soon.

However I would suggest to do that using the combination of DropList and ListBox. You could select a directory in DropList and files in ListBox.


You can dynamically generate the list of files using a combination of FindFirst and calling SendMessage to the listbox control on your IO page. Send the LB_ADDSTRING message with the text to be added. The syntax for this message is documented on MSDN.

I have used this technique with great success to circumvent the default NSIS restriction of 1024 characters for the LISTITEMS field in the IO ini file.
(I did not want to download a special build or recompile NSIS.)
This allows me to add as many items to a listbox using Windows API.

[edit]
In your case the list of files seems to come from a remote server.
What protocol are you using to get the files?
[/edit]


Originally posted by iceman_k

[edit]
In your case the list of files seems to come from a remote server.
What protocol are you using to get the files?
[/edit]
Thx for the tip! I will look into it later. I figure that I first use NSISdl to download a text file containing the file names and then parse the file names to InstallOptions page. It is not going to be easy since I am a newbie in NSIS but this is fun to try at least.

One more tip would be to use the Windows LB_XXXX messages to get the selected items from the listbox.
If it is just a few items you can get it from the STATE field in the IO ini file, but that again has a limit of 1024 characters in the default NSIS build.
If you need some help with this I can perhaps upload a simple example illustrating these techniques.


Originally posted by iceman_k
One more tip would be to use the Windows LB_XXXX messages to get the selected items from the listbox.
If it is just a few items you can get it from the STATE field in the IO ini file, but that again has a limit of 1024 characters in the default NSIS build.
If you need some help with this I can perhaps upload a simple example illustrating these techniques.
No, thank you. I am leaning towards custom built MFC app that will do all that and more with great ease.