如何在完全取消安装后显示消息?
答案 0 :(得分:2)
您可以监控CurStepChanged
。如果最后一步是ssInstall
而你永远不会进入ssPostInstall
,只允许ssDone
,安装很可能会中止。在这种情况下,请在DeinitializeSetup
event function。
[Code]
var
LastStep: TSetupStep;
procedure CurStepChanged(CurStep: TSetupStep);
begin
Log(Format('Step: %d', [CurStep]));
LastStep := CurStep;
end;
procedure DeinitializeSetup();
begin
{ Installation started, but never finished => It must have been cancelled. }
if LastStep = ssInstall then
begin
MsgBox('The installation was successfully aborted.', mbInformation, MB_OK);
end;
end;