Archive: replace compressed file within installer


replace compressed file within installer
hi,
is there any possibility to replace a file within a installer exe?

The installer was packed with the default zlib algorithm and the file i want to be replaced has the same size as the one included in the installer.

I recognized, that 7zip is able to read and extract the exe and i am able to locate the file within the installer, opend in 7zip but it seems they haven't implemented functionalities for replacing or adding files in this mode yet.

thanks a lot!


May I ask (plz forgive my simpleness) why not just recompile your script adding the file you want to be replaced?


yes, legitimate question ;)
the installer generation is embedded as one task in our build pipeline. the builds are under a cms and the installer, that needed one file fixed is the product of an older build process. Therefore it would be timeconsuming and error-proned to do a rebuild of this state or trying to reconstruct the build out of existing files for recompiling the script.


I see, however developers who want to distribute software safely, should never disable the CRCCheck (which is enabled by default) so even if 7zip or another tool would offer abilities to add/replace files within the package, would be useless as they would alter the CRC causing the installer to pop up a warning about potential danger.


indeed, i have crccheck disabled, because the installer can only be transfered within a client-server-application, which is caring about the issue of devective transmissions.
additionally, the file i want to be replaced has the same size as the original one (to the last bit), because i only changed a string-content.
so, do you think there is any possibility to replace this file?


As far as I know the only tool that is able to open a NSIS package is 7zip but you already know that they haven't implement yet the add/replace feature.
I'm afraid you're going to recompile the whole script or create a patch which updates the current installation with the new file.


that was the answer i was afraid of, but thank you very much for your aid!