加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

inno-setup – 在Inno Setup中终止32位Windows上的设置

发布时间:2020-12-15 09:15:20 所属栏目:大数据 来源:网络整理
导读:我正在使用Inno Setup. 如果Windows版本是32位,有人可以告诉我如何终止设置吗? 或者更具体地说,当安装程序启动时,代码会检查Windows版本是否为32位并显示警告然后取消设置. 什么是完全终止设置的命令? 我正在使用以下程序 procedure CheckWindows;begin if
我正在使用Inno Setup.

如果Windows版本是32位,有人可以告诉我如何终止设置吗?

或者更具体地说,当安装程序启动时,代码会检查Windows版本是否为32位并显示警告然后取消设置.

什么是完全终止设置的命令?

我正在使用以下程序

procedure CheckWindows;
begin
  if not IsWin64 then
  begin
    MsgBox('Error:The Windows version is 32bit',mbError,MB_OK);
    WizardForm.Close;
  end;
end;

它确实给出了警告消息,但随后它允许用户继续,如果他们想要的话.

如何完全终止安装?

解决方法

当您检测到32位系统(使用 IsWin64 function)时,只需从 InitializeSetup返回False.

function InitializeSetup(): Boolean;
begin
  Result := True;

  if not IsWin64 then
  begin                     
    SuppressibleMsgBox('Error:The Windows version is 32bit',MB_OK,MB_OK);
    Result := False;
  end;
end;

另见Exit from Inno Setup Installation from [code].

或者只使用ArchitecturesAllowed directive.

也可以看看:

> Does ArchitecturesAllowed Inno Setup directive concern CPU architecture or operating system architecture?
> Show a custom message for unsupported architectures.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读