0

NSIS allows you to insert data on to the back of their exe files and then allows you to be able to read that data back during installation:

http://nsis.sourceforge.net/ReadCustomerData

How do I append my exe file with text data in a linux server environment?

Edit (from comment):
I've got a pre-compiled .exe file, I merely want to append data to it to satisfy the criteria here: nsis.sourceforge.net/ReadCustomerData, does any one with NSIS experience know if I could do something like echo "mydata:hello,world" >> installer.exe?

4
  • 1
    "NSIS (Nullsoft Scriptable Install System) is a professional open source system to create Windows installers" – Nifle Apr 23 '15 at 12:08
  • What @Nifle said. you might want to look into Chef, Puppet or something similar. – user38331 Apr 23 '15 at 13:35
  • I don't think I've phrased the question well enough, I've got a pre-compiled .exe file, I merely want to append data to it to satisfy the criteria here: nsis.sourceforge.net/ReadCustomerData, does any one with NSIS experience know if I could do something like echo "mydata:hello,world" >> installer.exe? – arcanine Apr 23 '15 at 14:48
  • Is this file to be used in Linux (e.g. through WINE) or in Windows? It certainly cannot be executed under Linux itself. – DrMoishe Pippik Apr 23 '15 at 18:45
0

Seems like yes this can be done, I'm doing it in PHP on download, simply echo your additional data along with your file and that data can be read by the NSIS installer without recompiling your application without corrupting the binary

echo "mydata:hello,world" >> installer.exe would work too (on any OS) add the function included on the wiki to your nsis script then use something like to call the function and read the data:

Push "mydata:"
Call ReadCustomerData
Pop $R1
StrCmp $R1 "" 0 +3
MessageBox MB_OK "No data found"
Abort
MessageBox MB_OK "Customer data: '$R1'"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.