А в скрипте что добавить?
ничего
указывать для распаковки первый файл многотомного архива .001
Код: Выделить всё
function UninstallMyApp1(): Boolean;
var
Buff: String;
i: Integer;
begin
Result := not RegQueryStringValue( HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{#SetupSetting("AppID")}', 'UninstallString', Buff );
if not Result then Result := not FileExists(RemoveQuotes(Buff));
if not Result then if MsgBox('Перед установкой необходимо удалить предыдущую версию приложения. Продолжить?', mbError, MB_YESNO) = IDYES then
try
Exec(RemoveQuotes(Buff), '', ExtractFilePath(RemoveQuotes(Buff)), SW_SHOW, ewWaitUntilTerminated, i);
finally
Result := not RegQueryStringValue( HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{#SetupSetting("AppID")}', 'UninstallString', Buff );
end;
end;
function UninstallMyApp2(): Boolean;
var
Buff: String;
i: Integer;
begin
Result := not RegQueryStringValue( HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{#SetupSetting("AppID")}_is1', 'UninstallString', Buff );
if not Result then Result := not FileExists(RemoveQuotes(Buff));
if not Result then if MsgBox('Перед установкой необходимо удалить предыдущую версию приложения. Продолжить?', mbError, MB_YESNO) = IDYES then
try
Exec(RemoveQuotes(Buff), '', ExtractFilePath(RemoveQuotes(Buff)), SW_SHOW, ewWaitUntilTerminated, i);
finally
Result := not RegQueryStringValue( HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{#SetupSetting("AppID")}_is1', 'UninstallString', Buff );
end;
end;
function InitializeSetup(): Boolean;
begin
Result := UninstallMyApp1();
Result := UninstallMyApp2();
end;