El Sanchez, спасибо за правку! я понял своё косячище
теперь ошибка не вылезает!

вот только с этой строкой ( for i :=
1 to GetArrayLength(FileList)-1 do ... ) попытаться извлечь 2 файла из архива ['half-life high definition.gcf', 'se15\counter-strike.gcf'], то извлечётся только второй фаил
'se15\counter-strike.gcf' с индексом 1,
поэтому ( for i :=
0 to GetArrayLength(FileList)-1 do ... ) приводит к нужному результату
======
с FileList[0] := '*.*' извлекаются только файлы лежащие в корне архива. Те, напимер, 'se15\counter-strike.gcf' не распакуется
получается если массив пустой то делать вообще ничего не надо (в смысле никакие параметры архиватору не нужны)
только если не пустой нужен код:
Код:

if GetArrayLength(FileList) > 0 then
for i := 0 to GetArrayLength(FileList)-1 do
begin
s7cmd := s7cmd + ' -i';
if RecurseFolders then s7cmd := s7cmd + 'r';
s7cmd := s7cmd + '!"' + RemoveQuotes(FileList[i]) + '"';
end;
вывод:
извлекаем все файлы с подкаталогами. Те реально всё - SevenZipExtractArchive(szStatus.Handle, 'C:\hl1.VALVE',
[], False, True, '', True, 'c:\setup', False, CallbackAddr('ArchiverCallbackProc'));
извлекаем нужные файлы : SevenZipExtractArchive(szStatus.Handle, 'C:\hl1.VALVE',
['half-life high definition.gcf', 'se15\counter-strike.gcf'], False, True, '', True, 'c:\setup', False, CallbackAddr('ArchiverCallbackProc'));
Проверено. Работает.

хотя прошу желающих на всякий случай потестить
вот тестовый архив:
http://sendfile.su/700617
========
функция целиком:
читать дальше »
Код:

function SevenZipExtractArchive(hWnd: HWND; ArchiveFilename: String; FileList: TArrayOfString;
RecurseFolders: Boolean; OverwriteExistingFiles: Boolean; Password: String; ExtractFullPaths: Boolean; ExtractBaseDir: String; ShowProgress: Boolean; Callback: Longint): Integer;
var
S7ResultOutput, s7cmd: AnsiString;
i: Integer;
begin
Result := SZ_ERROR;
if not FileExists(ArchiveFilename) then Exit;
//
//if FileList[0] = '' then FileList[0] := '*.*';
if Callback <> 0 then ShowProgress := False;
if ExtractFullPaths then s7cmd := 'x' else s7cmd := 'e';
s7cmd := s7cmd + ' "' + ArchiveFilename + '" -o"' + ExtractBaseDir + '"';
// s7cmd := s7cmd + ' "' + FileList[0] + '"';
//
// if GetArrayLength(FileList) = 0 then
// begin
// SetArrayLength(FileList, 1);
// MsgBox('0',mbError, MB_OK);
// FileList[0] := '*.*';
// end;
if GetArrayLength(FileList) > 0 then
for i := 0 to GetArrayLength(FileList)-1 do
begin
s7cmd := s7cmd + ' -i';
if RecurseFolders then s7cmd := s7cmd + 'r';
s7cmd := s7cmd + '!"' + RemoveQuotes(FileList[i]) + '"';
end;
//
if RecurseFolders then s7cmd := s7cmd + ' -r';
if Password <> '' then s7Cmd := s7Cmd + ' -p' + Password;
if OverwriteExistingFiles then s7cmd := s7cmd + ' -aoa' else s7cmd := s7cmd + ' -aos';
if not ShowProgress then s7cmd := s7cmd + ' -hide';
s7cmd := s7cmd + ' -y';
try
s7ResultOutput := StringOfChar(#0, 10240);
if Callback <> 0 then
begin
//get handles for 7-zip callback thread
hProgress := ProgressPage.ProgressBar.Handle;
hMsg1Label := ProgressPage.Msg1Label.Handle;
hMsg2Label := ProgressPage.Msg2Label.Handle;
//show progress page
ProgressPage.Show;
ProgressPage.ProgressBar.Show;
ProgressPage.Description := 'Extract';
//set callback
SevenZipSetOwnerWindowEx(hWnd, Callback);
end;
Result := SevenZip(hWnd, s7cmd, S7ResultOutput, Length(s7ResultOutput)-1);
finally
if Callback <> 0 then
begin
ProgressPage.Hide;
SevenZipKillOwnerWindowEx(hWnd);
end;
//MsgBox(S7ResultOutput, mbInformation, MB_OK);
except
Result := SZ_DLLERROR;
end;
end;
PS:
блин
возможности у кода суперские
любой параметр ком.строки можно загнать в функцию (при необходимости настраивать через входные параметры)
и ещё куча функций (типа SevenZipGetArchiveType или SevenZipCheckArchive)
hl1.VALVE есть 7зип архив(не sfx). я только поменял расширение "7z" на имя всем известной конторы (для понта)