title: Inno Setup, APP start When windows start
body: <p>For Inno Setup,
  I would like to create a checkbox Task for MyAPP Auto Start when Windows Start.
  My code like below :</p>
  
  <p>And, How to write the codes below - DO_Set_AutoStart_WhenWindowsStart()
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</p>
  
  <pre><code>[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 &lt;&gt; -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;
  </code></pre>