我正在使用Inno Setup. 如果Windows版本是32位,有人可以告诉我如何终止设置吗? 或者更具体地说,当安装程序启动时,代码会检查Windows版本是否为32位并显示警告然后取消设置. 什么是完全终
如果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', mbError, 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.
