Hi, ich bräuchte mal wieder eure HILFE...
ich habe folgenden Code:
Delphi-Quellcode:
If Label1.Caption:='xxxxxxx' AND
If Fileexists('C:\xxxxxxx') THEN begin
with AbCabExtractor1 do begin
FileName := ExtractFilePath(paramstr(0))+'xxx.cab';
BaseDirectory := 'c:\xxx';
try
ExtractFiles('xxxxx');
Progressbar1.StepIt;
finally
end;
with AbUnzipper1 do begin
FileName := 'c:\xxxxxxx';
BaseDirectory := ABCabExtractor1.BaseDirectory;
ABUnzipper1.Password:='xx';
ExtractFiles( 'xxxx' );
Progressbar1.StepIt;
end;
RenameFile('C:\xxxx','C:\xxxx.xxx');
Progressbar1.StepIt;
ShellExecute(0, nil, PChar('c:\xxxx.xxx'), nil, nil, sw_Show);
Progressbar1.StepIt;
Progressbar1.Visible:=False;
ABUnzipper1.CloseArchive;
DeleteFile('xxxxxxxxx');
end;
end
ELSE begin
with AbCabExtractor1 do begin
FileName := ExtractFilePath(paramstr(0))+'xxx';
BaseDirectory := 'xxxx';
try
ExtractFiles('xxxxx');
Progressbar1.StepIt;
finally
end;
end;
with AbUnzipper1 do begin
FileName := 'c:\xxxxxx';
BaseDirectory := ABCabExtractor1.BaseDirectory;
ABUnzipper1.Password:='xx';
ExtractFiles( 'xxxx' );
Progressbar1.StepIt;
end;
RenameFile('C:\xxx','C:\xxxxx.xxx');
Progressbar1.StepIt;
ShellExecute(0, nil, PChar('c:\xxxx), nil, nil, sw_Show);
Progressbar1.StepIt;
Progressbar1.Visible:=False;
ABUnzipper1.CloseArchive;
DeleteFile('xxxxx');
end;
end;
Nur ich habe Probleme mit den abschließenden "end;'s" Wer könnte mir da helfen?