在Inno Setup中隐藏消息框是什么意思? [英] What does it mean that message boxes are being suppressed in Inno Setup?

查看:114
本文介绍了在Inno Setup中隐藏消息框是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是文档中的页面: SuppressibleMsgBox .

这是什么意思如果消息框被抑制... ?

推荐答案

引用的部分后面有指向说明的链接:

There's a link to the explanation right after the part you have quoted:

如果消息框被禁止显示(请参阅设置命令行参数) ,则返回Default.

在链接中,有 /SUPPRESSMSGBOXES命令行参数已记录:

In the link, there's /SUPPRESSMSGBOXES commandline parameter documented:

指示安装程序隐藏消息框.仅当与'/SILENT'或'/VERYSILENT'组合时才有效.

Instructs Setup to suppress message boxes. Only has an effect when combined with '/SILENT' or '/VERYSILENT'.

因此,通常SuppressibleMsgBox的行为类似于 MsgBox .但是,如果使用/SUPPRESSMSGBOXES参数运行安装程序,则SuppressibleMsgBox不会执行任何操作,只会默默地返回Default参数的值.

So normally, the SuppressibleMsgBox behaves as the MsgBox. But if you run the installer with the /SUPPRESSMSGBOXES parameter, the SuppressibleMsgBox does nothing, only silently returns the value of the Default parameter.

函数使用的实际示例:

function NextButtonClick(CurPageID: Integer): Boolean;
var
  Dir: string;
  Msg: string;
begin
  Result := True;
  if CurPageID = wpSelectDir then
  begin
    Dir := WizardForm.DirEdit.Text;
    if Pos(' ', Dir) > 0 then
    begin
      Msg :=
        'It is not recommended to install the application to a path with spaces. ' +
        'Do you want to continue anyway?';
      if SuppressibleMsgBox(Msg, mbInformation, MB_YESNO, IDYES) = IDNO then
      begin
        Result := False;
      end;
    end;
  end;
end;

在交互式安装中,如果用户尝试安装到带空格的路径,安装程序将发出警告.但是,如果要使用/SILENT /SUPPRESSMSGBOXES自动执行静默安装,则安装程序将继续进行.

In an interactive installation, the installer will warn, if the user tries to install to a path with spaces. But if you are automating a silent installation with /SILENT /SUPPRESSMSGBOXES, the installer will proceed.

每当您不希望该特定消息中断静默安装时,最好使用SuppressibleMsgBox.因此,在大多数情况下.

It's good idea to use SuppressibleMsgBox whenever you do not want that particular message to break silent installation. So for most cases.

这篇关于在Inno Setup中隐藏消息框是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆