Export (0) Print
Expand All

IUpdateApproval Interface

Use this interface to get information about an approval and to remove the approval. To get this interface, call the following methods: Approve; Approve; GetUpdateApproval; Item.


Namespace: Microsoft.UpdateServices.Administration
Assembly: Microsoft.UpdateServices.Administration (in Microsoft.UpdateServices.Administration.dll)

public interface IUpdateApproval
public interface IUpdateApproval
public interface IUpdateApproval

The following Visual Basic subroutine iterates through all the IUpdateApproval objects in an UpdateApprovalCollection and writes out the deadline, if any.

Sub GetApprovals(ByVal Approvals As UpdateApprovalCollection)
    For Each Approval As IUpdateApproval In Approvals
       If (Approval.Action = UpdateApprovalAction.Install Or Approval.Action = UpdateApprovalAction.Uninstall) Then
          'is there a deadline?
          If (Approval.Deadline <> DateTime.MaxValue) Then
             Debug.WriteLine(Approval.Deadline.ToLongDateString)
          Else
             Debug.WriteLine("None")
          End If
       End If
    Next
End Sub

Development Platforms

Target Platforms

Windows Server 2008, Windows Server 2003, Windows Server 2008 R2
Show:
© 2014 Microsoft