anchor.diff:  
       pTasks := pTaskFolder.GetTasks(0);
   
  -    for i := 0 to pTasks.Count - 1 do
  +    for i := 1 to pTasks.Count do // 1-based collection
  +    begin
         pTaskFolder.DeleteTask(pTasks.Item[i].Name, 0);
  +    end;
   
       pTaskFolder := nil;
       pService.GetFolder('\').DeleteFolder(CTaskFolderName, 0);
  
positive.code: class procedure TKeymanStartTaskUninstall.ReportEvent(const Message: string);
  var
    hEventLog: THandle;
  begin
    kl.LogError(Message);
    hEventLog := RegisterEventSource(nil, 'Keyman-Uninstall');
    Winapi.Windows.ReportEvent(
      hEventLog,
      EVENTLOG_ERROR_TYPE,
      1,
      1,
      nil,
      0,
      Length(Message) * sizeof(Char),
      nil,
      PChar(Message)
    );
    CloseHandle(hEventLog);
  end;
  
  class procedure TKeymanStartTaskUninstall.DeleteAllTasks;
  
negative.code: uses
    System.SysUtils,
    System.Variants,
    System.Win.ComObj,
    Winapi.ActiveX,
    Winapi.Windows,
  
  