mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-12-28 18:41:14 +00:00
templates: Exit-early if the user aborts the removal of an older version
This commit is contained in:
parent
5bdcefd618
commit
07182d2f89
1 changed files with 13 additions and 10 deletions
|
@ -238,7 +238,10 @@ var
|
||||||
begin
|
begin
|
||||||
// Attempt to remove old version if it exists.
|
// Attempt to remove old version if it exists.
|
||||||
if (IsUpgrade()) then begin
|
if (IsUpgrade()) then begin
|
||||||
UninstallOldVersion();
|
if (UninstallOldVersion() != 0) then begin
|
||||||
|
Result := "Removal of older @PROJECT_NAME@ version was cancelled. Unable to continue with normal installation process, Setup will now abort."
|
||||||
|
exit;
|
||||||
|
end
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// Also ensure that we have the necessary prerequisites installed to run the program.
|
// Also ensure that we have the necessary prerequisites installed to run the program.
|
||||||
|
@ -404,7 +407,7 @@ begin
|
||||||
sUninstallerPath := GetUninstallerPath();
|
sUninstallerPath := GetUninstallerPath();
|
||||||
if (sUninstallerPath <> '') then begin
|
if (sUninstallerPath <> '') then begin
|
||||||
sUninstallerPath := RemoveQuotes(sUninstallerPath);
|
sUninstallerPath := RemoveQuotes(sUninstallerPath);
|
||||||
if Exec(sUninstallerPath, '/VERYSILENT /NORESTART /SUPPRESSMSGBOXES', '', SW_HIDE, ewWaitUntilTerminated, iResultCode) then begin
|
if Exec(sUninstallerPath, '', '', SW_HIDE, ewWaitUntilTerminated, iResultCode) then begin
|
||||||
Result := iResultCode
|
Result := iResultCode
|
||||||
end else begin
|
end else begin
|
||||||
Result := 1
|
Result := 1
|
||||||
|
|
Loading…
Reference in a new issue