View Full Version : personalised installer
6th February 2007, 14:34
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.
6th February 2007, 15:43
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.
6th February 2007, 18:48
You can append data to the installer. See the following wiki page.
7th February 2007, 10:25
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?
7th February 2007, 11:46
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.
7th February 2007, 12:24
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?
7th February 2007, 13:18
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.
12th February 2007, 14:28
> 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.
12th February 2007, 14:35
And since the date is in widestrings (Unicode) you have to look hex sting then like : 100210021005200450050004C004100430045004D0045004E004F00570059004500530049004D0053005500520045002100210021
12th February 2007, 14:48
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!
vBulletin® v3.8.6, Copyright ©2000-2013, Jelsoft Enterprises Ltd.