Y at-il un moyen de décompresser un seul fichier à partir d'un zip? J'utilise code basé sur response pour How to get Inno Setup to unzip a file it installed (all as part of the one installation process), fonctionne parfaitement pour Décompressez mais n'ont pas une idée comment peut-il décompressez un seul fichier:Comment obtenir Inno Setup pour décompresser un seul fichier?
[Code]:
const
NO_PROGRESS_BOX = 4;
RESPOND_YES_TO_ALL = 16;
procedure UnZip(ZipPath, TargetPath: string);
var
Shell: Variant;
ZipFile: Variant;
TargetFolder: Variant;
begin
Shell := CreateOleObject('Shell.Application');
ZipFile := Shell.NameSpace(ZipPath);
if VarIsClear(ZipFile) then
RaiseException(Format('ZIP file "%s" does not exist or cannot be opened', [ZipPath]));
TargetFolder := Shell.NameSpace(TargetPath);
if VarIsClear(TargetFolder) then
RaiseException(Format('Target path "%s" does not exist', [TargetPath]));
TargetFolder.CopyHere(ZipFile.Items, NO_PROGRESS_BOX or RESPOND_YES_TO_ALL);
end;
Merci, fonctionne parfaitement. –