Search code examples
windows-7windows-serviceswindows-xpnsis

Send To Compressed (zipped) Folder from NSIS


Is there a way to programmatically Send (a single file) To Compressed (zipped) Folder from an NSIS script?

In my search, I found reference to opening such folder using:

rundll32.exe zipfldr.dll,RouteTheCall %filename%

But I haven't been able to find the opposite.

I also found references to creating a compressed (or zipped) folder by writing a fully fledged program in C++, VB, C#, or VJ# but that is not what I am interested in. I am interested in a simple call from an NSIS script.

Is this possible at all?


Solution

  • While it is possible to use the CompressedFolder feature to create zip files and NSIS can call native API's and COM interfaces, I can't really say that it would be a good idea. Some people don't like the CompressedFolder feature and disable it. It is probably better to include a command line zip tool in your installer and call that.

    So to answer the question; yes it is possible, but calling COM from NSIS is a big pain and the code would break on machines where the CompressedFolder feature has been disabled.