Inno Setup の場合、Windows の起動時に MyAPP Auto Start のチェックボックス タスクを作成したいと思います。以下のような私のコード:
そして、以下のコードの書き方 - DO_Set_AutoStart_WhenWindowsStart() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[Tasks]
Name: "StartMenuEntry" ; Description: "Start my app when Windows starts" ; GroupDescription: "Windows Startup"; MinVersion: 4,4;
[code]
//Do Additional Task - Auto Start when Windows Start 
function NextButtonClick(CurPageID: Integer): Boolean;
var
  Index: Integer;
begin
  Result := True;
  if CurPageID = wpSelectTasks then
  begin
    Index := WizardForm.TasksList.Items.IndexOf('Start my app when Windows starts');
    if Index <> -1 then
    begin
      if WizardForm.TasksList.Checked[Index] then
        MsgBox('First task has been checked.', mbInformation, MB_OK)
        DO_Set_AutoStart_WhenWindowsStart();
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      else
        MsgBox('First task has NOT been checked.', mbInformation, MB_OK);
    end;
  end;
end;