0

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?

Community
  • 1
  • 1
WinWin
  • 7,493
  • 10
  • 44
  • 53

1 Answers1

1

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.

Community
  • 1
  • 1
Anders
  • 97,548
  • 12
  • 110
  • 164
  • Thanks for this clarification. I am now convinced that it is better to include a command line zip tool in your installer and call that. Do you know of such tool that has the same "proprietary-friendly" license as NSIS has? (that is, I can *legally* include it in my installer) – WinWin Jun 05 '11 at 15:41