Archive: Fetching remote content in installer


Fetching remote content in installer
Hi,

I'm new to the installer world and I have to create an installer that connects to a remote service for license key authentication and some other content (links to other 3rd that are required but cannot be bundled with the application).

I do not want to bundle the links with the installer since they'll quickly become outdated. Providing these links in the installer is a mandatory requirement for it.

I was wondering if NSIS can handle these requirements and if you have some pointers to documentation relevant for this.

Your help is greatly appreciated.


You will have to have at least one hard coded link in your installer. This would point to a remote INI file containing all the other links.

Use the InetC plug-in to download files.

Stu


Thanks for your reply afrow. What about the remote license key authentication? Is there any way to connect to a remote service? (SOAP)


If you can do this through a web executable (written in PHP for example) then you can pass data onto it using InetC and POST.

Stu


Thanks! If I use an HTTP POST to post the license key from the client(installer) to the web executable what options would I have for the response? (i.e. how do I respond to the installer to tell it whether the key was validated or not?)

Also if you have code snippet for how the installer part would look(passing the license key from the installer to the validator using InetC) or a pointer to something similar that would be great!

Thanks again.


The POST string is the same as a GET string, for example:
"key=$R0"
Then in PHP it would be $_POST['key'].

As for returning output, you simply echo it. InetC downloads the output as plain text (you should use header('Content-Type: text/plain') in PHP to be sure) and so you just open the file with FileOpen, FileRead and FileClose.

Stu