Uninstall not when setup just begins, but right before install begins

This commit is contained in:
DarkPhoenix
2020-02-03 06:17:28 +03:00
parent a65129b277
commit 97cdde84ce

View File

@@ -175,10 +175,13 @@ begin
end;
/////////////////////////////////////////////////////////////////////
function InitializeSetup(): Boolean;
var
sUnInstallString: string;
procedure CurStepChanged(CurStep: TSetupStep);
begin
Result := True; // No idea if result is needed for some kind of API, but keeping it here just in case
UnInstallOldVersion();
if (CurStep=ssInstall) then
begin
if (IsUpgrade()) then
begin
UnInstallOldVersion();
end;
end;
end;