union
1st November 2011 22:47 UTC
Embedding some identifier to installer
Hello!
First of all sorry for my poor English.
I need some identifier in the installer, which can be changed directly by editing the exe-file (as it will occur on the server).
I tried to add in installer text file containing a string of "XXXXXXXXXXX" pointing to his "SetCompress off". When I open the installer in the hex-editor, I find this line in it, but if I change it, the installer will not run.
Anybody can help me?
Thanks in advance
LoRd_MuldeR
1st November 2011 23:01 UTC
This didn't work, because generally modifications of the installer EXE occur due to download errors. And NSIS uses a CRC check to detect corrupted (modified) installers. You could work around this "problem" by disabling the CRC check, BUT THIS IS A VERY BAD IDEA. Instead you could try to append some additional data to the end of the EXE file, after it has been compiled by MakeNSIS. I would assume this additional data ("overlay") is not covered by the CRC check. You could then open the EXE file for reading via FileOpen and $EXEFILE. As the size of the EXE file is not known beforehand, you don't know the exact seek position where you'll find your data. Instead you will have to add some "magic number" in front of the data. Then you can scan through the file via FileReadByte until you have found the "magic number" (and thus the desired data). Maybe start the search at some offset in order to speed-up the process...
union
2nd November 2011 06:13 UTC
Thank you for your answers guys!
I think my problem is solved. I will use the ReadCustomerData function.