build/windows: Do not allow cancelling itReinstall nor itUpdate

As said on cbe2f6be, Inno does not support modifying installations at
all, not even canceling/undoing modifications like reinstall and update.

This limitation become more apparent after the fix 24e42dd1 so
let's prevent the users being damaged by such major Inno pitfall.
This commit is contained in:
Bruno Lopes 2026-03-24 08:50:19 -03:00
parent cbc8150749
commit 06d8bd6c54

View file

@ -2752,6 +2752,12 @@ begin
case pCurStep of
ssInstall:
begin
//As on usUninstall, do not allow to cancel on itReinstall or itUpdate
//since Inno does not undo [InstallDelete] and RemoveDebugFiles()
if (InstallType = 'itReinstall') or (InstallType = 'itUpdate') then begin
WizardForm.CancelButton.Enabled := False;
end;
if IsAdminInstallMode() then begin
RestorePoint();
end;