Archive: Using NSISDL plugin to download patch through web server


Using NSISDL plugin to download patch through web server
Hi all,

I have a mini installer that would just install patches for my application. I want to create another installer that would download the mini installer from the web server.

I found the NSISdl plugin for downloading files and checked the sample as well, but I don't see anything in the sample that there's a download process being actually done.

I would appreciate your help. Thanks...


er?

http://nsis.sourceforge.net/Docs/NSISdl/ReadMe.txt

NSISdl::download /TIMEOUT=30000 http://www.domain.com/file localfile.exe


so, e.g.


NSISdl::download /TIMEOUT=30000 http://www.bedbuffersplace.com/myrealinstaller.exe "$PLUGINSDIR\myrealinstaller.exe"

Great! this is a better sample... easy to understand. thanks...

Now, given that I'm able to download the mini installer from the web server, is there also a way for the local installer to check for the latest mini installer available from the web server. I've heard you can do that through a web service. But is it possible with NSIS too?

Thanks...


there's two ways you can do that...
A. set up a server-side script that returns the latest package when accessing a common URL.

B. set up a file on the server that contains a reference to the latest version, download that file, read the url, then download from that URL

Option A is much cleaner, Option B is simpler and also offers additional flexibility as you can include any other information in the file.


wow! that's really neat.

How about using http's web service? is it possible in NSIS too?


Originally posted by bedbuffer
How about using http's web service? is it possible in NSIS too?
not entirely sure what you're asking there - can you explain?

Yes, I'm sorry. I'm referring to HTTP web services. These are programmatic ways of sending and receiving data from remote servers using the operations of HTTP directly. If you want to get data from the server, use a straight HTTP GET; if you want to send new data to the server, use HTTP POST.

The problem is I'm not sure if we could call these services in NSIS... :(


well, nsisdl does a HTTP GET, just like e.g. a browser would.

If you need HTTP POST, check out...

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

InetLoad:
http://nsis.sourceforge.net/InetLoad