Archive: Download system


Download system
Hi guys,

I was wondering if I could use NSIS to create some sort of download-system.

At this moment, I'm the administrator of a database, 10 GB in size (all PDF documents). This database is very important for certain people in our company.

Can NSIS do some incremental updates? What I mean is, users launch an .exe-file, which connects over a secure connection towards a File Server, and downloads the files which are connected to this user's profile.

What I need is:
- User authentication
- Secure transfer
- Incremental updates (if a file is already on the HDD of the employee, it doesn't need to be downloaded again, except if there's an update of this file)
- Some sort of logging
- The ability to delete files on the HDD of the employee.

Can anyone give me some answer to this project.

Thanks in advance.


Have you seen InetC plugin?

http://nsis.sourceforge.net/Inetc_plug-in

That has a lot of advanced abilities and as far I can say you may contact Takhir plugin's author to discuss about it.


Hi m8, thanks for the nice reply...
This plugin is really useful.

I just can't seem to figure out how to work with user profiles considering the download of the files...


ftp ls not implemented and I have not plan for this, but http server can send directory listing if path is a dir or script with path parameter (with possible .httaccess RewriteRule tricks). I see following steps:
1. configure http server.
2. write NSIS script requesting user's dir content and parsing server' reply (html is better for compatibility). May be good to have files versions in this list (or sizes at least). Authentication and https are not a problem, see inetc examples.
3. in the same loop compare files in list with local files list and download file/update if need. May be you can use these files http headers first to check version.
Unfortunately I have not time to write this, but looks not too complex...


Takhir,

Thanks for the quick reply.

Unfortunately, I'm not a real programming guy... I know something about Web Scripting and a little bit about VB, but that's it.

Your explanation is helping me a bit, but could you provide me with some more information? I'm currently reading the NSIS documentation to understand the programming a bit more.

Sorry for being such a n00b, but hey that's where everybody had to start! ;)


You'll need to write a PHP/Perl/JSP/ASP/whatever script to generate a list of files and possibly have their MD5 checksums as well. InetC can download the output of server executables just like any old plain text file then you can read from them in your NSIS script.

Possible ways of reading from them would be using FileOpen, ReadINIStr (INI files) and using one of the XML plugins (XML files).

Stu


I maintain an ini file on the server that has all of the file version information in it and have my installer download the ini first to compare with the installed files to determine if an update is necessary.
This works out well for me and I did not have to use any code other than NSIS; however, I do need to manually maintain the ini file which for me is not that hard since we don't have more than 2 or 3 changes each week.