Archive: Compress file on uninstall


Compress file on uninstall
Hi all,

i ve been searching posts about compressing files in NSIS installer/uninstaller but was not able to find information about my query.
I'd like to compress some files on uninstalling process before they get deleted by my uninstaller. I wanted to know if they were a NSIS plug-in that can help me. I found ZIPDLL.DLL plug-in but it seems it can only be used to uncompress files.

Thanks in advance.


Installer compresses the included files with the best compression choice available nowadays.

Well, you want to compress files before they get deleted by your uninstaller...
You probably could do that by the stand alone command line 7zip utility (7za.exe) that is available on 7zip download section.


Thanks i ll give a try to 7za.exe
Therefore, i think i gave a bad explanation to my problem :

I made a NSIS script to install my application. With that application user can create projects that are saved into a directory 'Projects' in $INSTDIR. When the user decide to uninstall my application i display a custom page (InstallOptions with checkboxes) that ask user if he want to keep files in the 'Projects' directory. I used to use RMDIR /r $INSTDIR to uninstall my application, i don't know how to skip deletion of a particular directory so i decided to copy this directory to a temporary place and wanted them to be zipped. I thought i could use NSIS script / plug-in to compress this files/sub-directories to store them in case of re-installation of my application.

Maybe this can be done with 7za.exe embedded in the NSIS script installer.

Thx


Originally posted by fluidz91
I used to use RMDIR /r $INSTDIR to uninstall my application, i don't know how to skip deletion of a particular directory...
There's a good chance to achieve that with Advanced Uninstall Log,

http://nsis.sourceforge.net/User:Red...og_NSIS_Header

I first wanted to use uninstall log (i don't remember if it was yours) but my app is 256Mb, 5617 files and 1897 directories, i was afraid that the log file would be too large to be used correctly at uninstall...