如何在Inno Setup中显示超链接?

Vic*_*Vic 11 installer inno-setup messagebox hyperlink pascalscript

我正在我的Inno安装程序安装程序中进行验证,以检查计算机上是否安装了Microsoft更新,如果没有,我会显示一个简单的消息框,告诉用户需要更新,这是消息代码:

MsgBox(
  'Your system requires an update supplied by Microsoft. ' +
  'Please follow this link to install it: ' + 
  'http://www.microsoft.com/downloads/details.aspx?FamilyID=1B0BFB35-C252-43CC-8A2A-6A64D6AC4670&displaylang=en',
  mbInformation, MB_OK);
Run Code Online (Sandbox Code Playgroud)

我想让URL成为网页的超链接,但我无法弄清楚如何在Inno Setup中添加文本作为超链接?

谢谢.

mgh*_*hie 16

MsgBox()Inno Setup中的功能是标准Windows MessageBox()功能的包装,AFAIK不支持嵌入式链接,所以不可能只显示那里的链接.

但是,您可以做的是通知用户需要更新,并询问他们是否在默认浏览器中打开链接.就像是:

function InitializeSetup(): Boolean;
var
  ErrCode: integer;
begin
  if MsgBox('Your system requires an update supplied by Microsoft. Would you like to visit the download page now?', mbConfirmation, MB_YESNO) = IDYES
  then begin
    ShellExec('open', 'http://www.microsoft.com/downloads/details.aspx?FamilyID=1B0BFB35-C252-43CC-8A2A-6A64D6AC4670&displaylang=en',
      '', '', SW_SHOW, ewNoWait, ErrCode);
  end;
  Result := False;
end;
Run Code Online (Sandbox Code Playgroud)

此代码将中止安装,但您可以创建自定义页面,以检查是否已安装更新,否则将阻止导航到下一页.但是,只有在无需重新启动系统的情况下安装更新时,此方法才有效.