Archive: Installer -> Script


Is there a way to reverse engineer an installer? I have a commercial installer which does some stuff, but before it ends I would like to do some more work, i.e. put our custom files into the same directory the user chose for the installer.

Thanks for any help,

Carsten


I was talking about that at some stage. But I don't think it's going to happen.


Reverse engineering and script extraction
It is fully possible to extract the script from the installer executable but it needs some translation, because when MakeNSIS.exe compiles a script it extracts all text in the .nsi file that is used on the dialogs and in messageboxes and put's it into a string table that is located between the installer code and he compressed files. All other stuff in the .nsi file such as codes and numbers are stored before (or after? i'm unsure) the string table and command names are shortened down to numbers to save space, and example of this is (and only an example!!):

File demo/*.mp3 -> 2 {reference to string "demo/*.mp3" in string table}
So if we knew the exact position (address) of these stuff in the installer we could extract and translate numbers to command and put the strings back in. I am not a good C/C++ programmer but I knew a little an and checked out the source code for NSIS where a saw a file with a token table (command table) where the numbers used for the commands are listed. Check it out...

hi,

uhm .. when i got it right, carsten doesn't want to decompile a nsis setup. :)

there are many setup-decompilers out there, you just have to search for the right one on your prefered search-engine.

btw: i don't think the distributor is that pleased when you reverse engineer their software-bundle and modify it.

cu yzo