Feature request: Archive extraction

169 views
Skip to first unread message

Bill Stewart

unread,
May 7, 2025, 12:17:30 PM5/7/25
to innosetup
Looks like Extract7ZipArchive doesn't support zip files (unless I missed something)?

If it doesn't, it would be helpful to have an ExtractZipArchive function.

(Or, a generalized ExtractArchive function with an 'archive file type' parameter).

Thanks!

Jernej Simončič

unread,
May 7, 2025, 1:30:41 PM5/7/25
to 'Bill Stewart' via innosetup on [innosetup]

Why? .7z files will practically always be smaller than zip files with the same content.

 

-- 
< Jernej Simončič ><><><><>< https://eternallybored.org/ >


If it does exist, it's out of date.
       -- Arnold's Second Law of Documentation

Bill Stewart

unread,
May 7, 2025, 3:48:48 PM5/7/25
to innosetup
On Wednesday, May 7, 2025 at 11:30:41 AM UTC-6 Jernej Simončič wrote:

Why? .7z files will practically always be smaller than zip files with the same content.

You might not have considered the use case that it would be useful to extract a .zip file that has been downloaded.

Gavin Lambert

unread,
May 7, 2025, 8:29:24 PM5/7/25
to innosetup
Usually you should only be downloading your own files, in which case you can choose to compress them differently.

But in any case, since Windows natively supports zip files, you can run a powershell fragment or do something with IShellFolder or similar.  Though it might be easier to just embed a tiny command line or DLL unzipper.

And before you say "but Inno already supports zip compression": the zip file format is not the same thing as zip compression.  I'm not sure whether the library that Inno uses does already support zip files, but it easily might not. 

Bill Stewart

unread,
May 8, 2025, 9:43:32 AM5/8/25
to innosetup
On Wednesday, May 7, 2025 at 6:29:24 PM UTC-6 Gavin Lambert wrote:

Usually you should only be downloading your own files, in which case you can choose to compress them differently.

Yes, usually. But in the case where one does not have control over the archive format of the file being downloaded, I still maintain it would be useful if said archive format is natively supported.

Martijn Laan

unread,
May 8, 2025, 9:53:50 AM5/8/25
to innosetup
See the CodeAutomation.iss example script for an example how to unzip a file.

Greetings,
Martijn


Op do 8 mei , 'Bill Stewart' via innosetup <inno...@googlegroups.com> schreef:
On Wednesday, May 7, 2025 at 6:29:24 PM UTC-6 Gavin Lambert wrote:

Usually you should only be downloading your own files, in which case you can choose to compress them differently.

Yes, usually. But in the case where one does not have control over the archive format of the file being downloaded, I still maintain it would be useful if said archive format is natively supported.

--
You received this message because you are subscribed to the Google Groups "innosetup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to innosetup+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/innosetup/23049e7e-fa5a-4e3f-be6f-9aa6d830515dn%40googlegroups.com.

Bill Stewart

unread,
May 8, 2025, 12:37:11 PM5/8/25
to innosetup
On Thursday, May 8, 2025 at 7:53:50 AM UTC-6 Martijn Laan wrote:

See the CodeAutomation.iss example script for an example how to unzip a file.

Yes, but that example uses the Shell.Application ActiveX automation object which IME is quite slow. I believe there's also no way to do any error-checking.

My current preference for handling this is to bundle the info-zip unzip.exe. I can use that to test (-t) the downloaded file and also to extract. A non-zero exit code from the executable indicates an error.

Bill

Martijn Laan

unread,
Jun 7, 2025, 3:51:12 AM6/7/25
to innosetup
Hi Bill,

I'm happy to report to archive extraction including .zip extraction will be fully integrated into the [Files] section in the next version. This includes support for password-protected archives.

All of this is optional and does not increase the size of Setup if not used.

More details can be found at: https://jrsoftware.github.io/issrc/whatsnew.htm

Example:

[Setup]
ArchiveExtraction=full
[Files]
Source: "{tmp}\Archive.zip"; DestDir: "{app}"; \
  Flags: external extractarchive recursesubdirs createallsubdirs ignoreversion

Greetings,
Martijn

Op 7-5-2025 om 18:17 schreef 'Bill Stewart' via innosetup:
--
You received this message because you are subscribed to the Google Groups "innosetup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to innosetup+...@googlegroups.com.

Bill Stewart

unread,
Jun 9, 2025, 10:58:24 AM6/9/25
to innosetup
On Saturday, June 7, 2025 at 1:51:12 AM UTC-6 Martijn Laan wrote:

I'm happy to report to archive extraction including .zip extraction will be fully integrated into the [Files] section in the next version. This includes support for password-protected archives.

Very nice, thank you!

Bill

Martijn Laan

unread,
Jun 16, 2025, 7:38:08 AM6/16/25
to innosetup
More good news: it will also support a new download flag, which can be used with or without the extractarchive flag.

See the new example script at https://github.com/jrsoftware/issrc/blob/files-downloadarchive/Examples/DownloadFiles.iss

This script demonstrates how to download files and archives, extract downloaded archives, and verify the integrity of downloaded files and archives, all without using [Code].

Was also able to add support for multi-volume archives and archives with custom extensions, such as self-extracting archives.

Greetings,
Martijn

Op 9-6-2025 om 16:58 schreef 'Bill Stewart' via innosetup:
--
You received this message because you are subscribed to the Google Groups "innosetup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to innosetup+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages