Archive: personalised installer


personalised installer
Hi,

Is there any possibility to set a registry (or a file) with a specific value that is injected (with a cgi script or something else) at the moment that someone is downloading the installer from a web page?
I mean that the installer has a registry value that should be filled by injecting the proper value at the download time.


I don't know if and how this could be done by server side, by nsis side you may compile a small "downloader" that is downloaded to the target and when executed performs the download of the installer, executes the installer, writes to registry etc.


You can append data to the installer. See the following wiki page.

http://nsis.sourceforge.net/ReadCustomerData


It is exactly what I needed, Thanks kichik. Now I am struggling my brain out how to make it work ...
I known, sounds stupid but ... I don't quite understand what should be added on the section "TODO: add dispatching code here". Any help?


It is also possible with a perl script on the serverside that replaces version information.

add to your NSIS script:

VIAddVersionKey MyExtraVersionData "!!!REPLACEMENOWYESIMSURE!!!"

then create your installer, then run the perl(or PHP) script that looks for !!!REPLACEMENOWYESIMSURE!!! in the setup.exe and replace it with your own data.


That will be perfect, Onad ...
but I cannot find "!!!REPLACEMENOWYESIMSURE!!!" in the setup.exe, and if I cange anything the setup.exe this will not work anymore. Is it something that I miss? Does the data is not encoded in the compiled exe? and if yes, how can I somehow just replace some specific value?


The version details are appended to the executable as a resource (Version information block)... you can probably update this resource server-side with a newly generated one.

If you have a Windows server, look into using Resource Hacker (which can do this), I'm not aware of an Win32 PE tools for *nix.


> I cange anything the setup.exe this will not work anymore.

That is not correct, you can just change version resources and the application keeps working, maybe disable CRC check of NSIS though, have not tried that.


And since the date is in widestrings (Unicode) you have to look hex sting then like : 100210021005200450050004C004100430045004D0045004E004F00570059004500530049004D0053005500520045002100210021


Ok!
I got it: either I can append everything at the end of the setup.exe or I can use VIAddVersionKey and then the installer read itself (using the example from ReadCustomerData) and use the found data :)

about NSIS i cannot tell much but about the support you find here I think is very professional and fast!