Inno Setup:获取“不创建开始菜单文件夹”选项

Inno Setup: Get 'Don't create a start menu folder' option

我正在编写 Inno Setup 脚本,该脚本应检查是否已存在具有给定名称的开始菜单条目。下面的脚本检查目录是否存在。问题是即使选择了 '不创建开始菜单文件夹' 选项,它也会检查是否存在,我不知道如何获取此信息。

function NextButtonClick(CurPageID: Integer): Boolean;
begin
  if CurPageID = wpSelectProgramGroup then
  begin
    if DirExists(ExpandConstant('{group}')) then { if the directory is not empty }
    begin   
      { I have no idea how to get the info if the user has selected }
      { the create start menu folder option or not }
      if { USER DID NOT SELECT THE 'Don't create a Start menu folder' OPTION } then
      begin
        MsgBox('Directory already exists. Please choose a different one.',
               mbConfirmation, MB_OK);
        Result := False;
      end
        else
      begin
        Result := True;
      end; 
    end
      else
    begin
      Result := True;
    end; 
  end { wpSelectProgramGroup }
    else
  begin
    Result := True;
  end; 
end;

直接查询NoIconsCheck复选框:

if not WizardForm.NoIconsCheck.Checked then