本文介绍了Inno Setup-取消安装后如何显示消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在完全取消安装后如何显示消息?

How to display a message after an installation is completely cancelled?

推荐答案

您可以监控 CurStepChanged .如果最后一个开始的步骤是ssInstall,而您再也没有进入ssPostInstall,仅放下ssDone,则很可能中止了安装.在这种情况下,请在 DeinitializeSetup事件函数中显示消息.

You can monitor the CurStepChanged. If the last step ever started is the ssInstall and you never get to the ssPostInstall, let only ssDone, the installation was most probably aborted. In that case, display the message in the 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;

这篇关于Inno Setup-取消安装后如何显示消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-29 15:25