Pascal Scripting: MapArchiveExtensions

Prototype:

procedure MapArchiveExtensions(const DestExt, SourceExt: String);

Description:

Allows files with a specified destination extension, such as .exe, to be treated as if they have a different source extension, such as .7z, for extraction purposes.

An exception will be raised if there was an error.

Remarks:

Calls to this function are ignored if the ArchiveExtraction [Setup] section directive is set to basic. In this case files as always extracted as .7z, regardless of the extension.

Example:
[Files]
Source: "{src}\My7ZipSFX.exe; DestDir: "{app}"; Flags: external extractarchive recursesubdirs createallsubdirs ignoreversion

[Code]
function InitializeSetup: Boolean;
begin
  MapArchiveExtensions('.exe', '.7z');
end;
See also:

ExtractArchive
CreateExtractionPage