Deleting an Approval

To delete an approval

  1. Retrieve an IUpdate instance of the update whose approval you want to remove.
  2. Call one of the overloaded IUpdate.GetUpdateApprovals() methods to retrieve the approval.
  3. Call IUpdateApproval.Delete() to delete the approval.

You cannot remove an automatic approval rule—you can only disable the rule.

To disable an automatic approval rule

  1. Call either the IUpdateServer.GetInstallApprovalRule() to retrieve the install approval rule or IUpdateServer.GetScanApprovalRule() to retrieve the scan approval rule.
  2. Set IAutomaticUpdateApprovalRule.Enabled to false.
  3. Call IAutomaticUpdateApprovalRule.Save() to save the rule.