nsis : how to protect files extraction from 7zip file manager

197 Views Asked by At

i would be glad to know if it is possible to protect the setup file from 7zip ? when you make "open with 7z" you can extract any files from your setup , there is a way to protect them ?

enter image description here

1

There are 1 best solutions below

4
Anders On

NSIS is open-source and will therefore always be susceptible to decompilation.

The best option is to re-compile NSIS yourself (admittedly this is a bit hard to do). After downloading the source you would have to reorder a couple of the EW_ entries in \Source\exehead\fileform.h. For example, move EW_CALL down to after EW_LOCKWINDOW and the build NSIS (you must build makensis and the stubs as a minimum). 7-zip will not be able to decompile your installers made with this custom NSIS.

The other option is to encrypt your files. Anyone with access to a debugger will be able to find your encryption password though.

If you are doing this to prevent piracy; it is much better to put the protection in the installed application, not the installer...