How To Create Auto-Extracting Zip Files

Jan 29, 2008 at 3:55 PM
How can one create auto-extracting zip files?
Coordinator
Jan 30, 2008 at 5:20 PM
Edited Jun 2, 2009 at 5:53 AM

This library does not currently do auto-extracting zip files. sorry.

[Update: as of v1.8.3.15, DotNetZip can produce self-extracting archives with a run-on-extract command.]

Jan 31, 2008 at 3:59 AM
No problem. The library works great nonetheless.

FWIW, I found this free component, http://www.zip-compression.com/self-extracting-exe.asp#download , that seems to have a command-line API, so I might try that.
Feb 1, 2008 at 6:52 PM
Edited Feb 1, 2008 at 6:54 PM
As a follow-up to my post above, note that the ChilKat componet http://www.zip-compression.com/self-extracting-exe.asp#download does work but it did not work for my purposes.

It does not work in my "SetupPackager" project because I need the setup.bat file (which is included in the zip and which ultimately performs the install) to delete itself along with the extraction directory and the extraction exe and everything else except a log file that it writes and, under those conditions it seems, that the self-extracting exe created by ChilKat cannot do that. (I could be wrong-- but, I am sure that do not have any time for any more testing on it.)

Furthermore, note that the self-extracting exe needed to prompt the user for a destination directory, which ends up being about as many clicks as if one just right-clicks in Windows Explorer and chooses "extract all". Therefore, we are not going to bother creating self-extracting exes.

That said, we have the DotNetZip component integrated and it works great. It builds a 20MB zip in less-than 10 seconds. Nice work and THANK YOU.
Coordinator
Jun 7, 2008 at 11:32 PM
Update; as of v1.5, the library does self-extracting zip files.
Coordinator
Jun 19, 2008 at 5:19 AM
ps: don't forget, DotNetZip is now donationware.
I am now accepting donations on behalf of my favorite charity.
If you find IIRF useful, consider donating.
Jul 1, 2008 at 8:54 PM
Is there a way to have the self-extractor run a file after the self-extraction is complete-- such as "launch setup.bat after extraction"?
Coordinator
Jul 2, 2008 at 7:10 AM
Edited Jun 2, 2009 at 5:54 AM

There is no way to do that today.

I will add that as a workitem for DotNetZip.

[Update: as of v1.8.3.15, in May 2009, DotNetZip can produce self-extracting archives with a run-on-extract command.]

Jun 1, 2009 at 11:30 PM

Hi,

I'd be very interested in running a file when the extraction has finished.


Also, it would be great if the command-line extractor's return code was the same as the one of the file that was run.
For example, we have a few scenarios where we bundle MsBuild scripts as self-extracting exes.
It would be very helpful if we could run the extractor, and check its return code to know if the scripts ran fine.

Thanks

Coordinator
Jun 2, 2009 at 3:38 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Jun 2, 2009 at 3:50 AM

In the current v1.8 of DotNetZip, there is already a run-on-extract feature for self-extracting archives.

It does not yet include the exit-code handling you described.

Jun 2, 2009 at 3:59 AM

Thanks for your prompt reply!
I will download the 1.8 preview to give it a try.

Coordinator
Jun 2, 2009 at 5:51 AM

ok, v1.8.3.15, now available, has the exit-code handling for the run-on-extract command on the CommandLine flavor of the SFX.