Pascal Scripting: ExtractArchive

Prototype:

procedure ExtractArchive(const ArchiveFileName, DestDir, Password: String; const FullPaths: Boolean; const OnExtractionProgress: TOnExtractionProgress);

Description:

Extracts the specified archive to the specified directory, with or without preserving full path names.

An exception will be raised if there was an error.

The supported archive formats, beyond .7z, and the support for password-protected and multi-volume archives, depend on the ArchiveExtraction [Setup] section directive.

To allow the extraction of archives with custom extensions, such as self-extracting archives, call MapArchiveExtensions.

Set OnExtractionProgress to a function to be informed of progress, or nil otherwise.

Remarks:

TOnExtractionProgress is defined as:

TOnExtractionProgress = function(const ArchiveName, FileName: String; const Progress, ProgressMax: Int64): Boolean;

Return True to allow the extraction to continue, False otherwise.

Example:

See DownloadFiles.iss for an example of archive extraction using just a [Files] entry.

See also:

CreateExtractionPage
MapArchiveExtensions
CreateDownloadPage
DownloadTemporaryFile
ExtractTemporaryFile