前段时间我有这个问题 此处重复其中一些代码:

procedure RebuildRunList;
var
  RunEntries: array of TRunEntry;
  I: Integer;
begin
  { Save run list ... }
  SetArrayLength(RunEntries, WizardForm.RunList.Items.Count);
  for I := 0 to WizardForm.RunList.Items.Count - 1 do
  begin
    RunEntries[I].Caption := WizardForm.RunList.ItemCaption[I];
    RunEntries[I].Checked := WizardForm.RunList.Checked[I];
    RunEntries[I].Object := WizardForm.RunList.ItemObject[I];
  end;

  { ... clear it ... }
  WizardForm.RunList.Items.Clear;

  { ... and re-create }
  for I := 0 to GetArrayLength(RunEntries) - 1 do
  begin
    { the first two entries are radio buttons }
    if (I = 0) or (I = 1) then
    begin
      WizardForm.RunList.AddRadioButton(
        RunEntries[I].Caption, '', 0, RunEntries[I].Checked, True, RunEntries[I].Object);
    end
      else
    begin
      WizardForm.RunList.AddCheckBox(
        RunEntries[I].Caption, '', 0, RunEntries[I].Checked, True, True, True,
        RunEntries[I].Object);
    end;
  end;
end;

procedure CurPageChanged(CurPageID: Integer);
begin
  if CurPageID = wpFinished then
  begin
    { Only now is the RunList populated. }
    { Two entries are on 64-bit systems only. }
    if IsWin64 then RebuildRunList;
  end;
end;

我想知道如何改善收音机的选择。 目前的缺点是迫使用户启动一个或另一个应用程序。 我想添加另一个单选选项以仅关闭安装程序。 理想情况下,它将使用Inno Setup提供的消息,这样我就不必要求翻译了。 (请参阅此问题 )。

能做到吗?

===============>>#1 票数:2 已采纳

最简单的解决方案是在RunList添加一个no-op条目:

[Run]
...
Filename: "{cmd}"; Parameters: "/C exit"; Description: "Exit setup";  \
    Flags: nowait postinstall runasoriginaluser unchecked skipifsilent runhidden; \
    Check: IsWin64

并将其转到单选按钮:

    { the first three entries are radio buttons }
    if (I = 0) or (I = 1) or (I = 2) then

  ask by Andrew Truckle translate from so

未解决问题?本站智能推荐: