IUpdate.AcceptLicenseAgreement Method ()

 

Applies To: Windows Server Update Services

Accepts the license agreement that is associated with the update.

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

Syntax

void AcceptLicenseAgreement()
void AcceptLicenseAgreement()
abstract AcceptLicenseAgreement : unit -> unit
Sub AcceptLicenseAgreement

Exceptions

Exception

Condition

WsusObjectNotFoundException

Thrown for either of the following reasons:

  • The update has a License Agreement, but it could not be found in the database.

  • The update does not have an associated License Agreement or the License Agreement has not been completely downloaded.

Remarks

Some updates require that you accept the license agreement before you can deploy the update. If RequiresLicenseAgreementAcceptance is true, you must accept the license agreement before deploying the update.

Typically, you call GetLicenseAgreement to get the license agreement, display the contents of license agreement to the user, and ask the user to accept the license agreement. If the user accepts the agreement, then call AcceptLicenseAgreement.

This operation requires WSUS Administrator privileges.

See Also

IUpdate Interface
Microsoft.UpdateServices.Administration Namespace

Return to top