sollte es so aussehen?
Delphi-Quellcode:
If Label1.Caption='xxxxxxx' AND 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;
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 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;
ordne die den code so ann, dass du auf einen Blick siehst, welches Begin zu welchem end gehört.
Gruß Robert
[Edit]da war wohl jemand schneller... [/Edit]