Old 1st November 2011, 20:47   #1
union
Junior Member
 
Join Date: Nov 2011
Posts: 2
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
union is offline   Reply With Quote
Old 1st November 2011, 21:01   #2
LoRd_MuldeR
Major Dude
 
LoRd_MuldeR's Avatar
 
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
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...

My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc
My source of inspiration: http://youtu.be/lCwY4_0W1YI
LoRd_MuldeR is offline   Reply With Quote
Old 1st November 2011, 22:33   #3
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
http://nsis.sourceforge.net/ReadCustomerData

Stu
Afrow UK is offline   Reply With Quote
Old 2nd November 2011, 04:13   #4
union
Junior Member
 
Join Date: Nov 2011
Posts: 2
Thank you for your answers guys!
I think my problem is solved. I will use the ReadCustomerData function.
union is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump