IUpdate.AcceptLicenseAgreement()

Accepts the license agreement that is associated with the update.

public void AcceptLicenseAgreement();
Public Sub AcceptLicenseAgreement()
Implements IUpdate.AcceptLicenseAgreement

Parameters

This method has no parameters.

Return Value

This method does not return a value.

Exceptions

Exception type Condition
WsusObjectNotFoundException You can receive this exception because of 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 IUpdate.RequiresLicenseAgreementAcceptance is true, you must accept the license agreement before deploying the update.

Typically, you call IUpdate.GetLicenseAgreement to retrieve 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.

Requirements

Server Requires Windows Server 2003 or Windows 2000 Server SP4 and later.
Namespace

Defined in Microsoft.UpdateServices.Administration.

Assembly

Requires Microsoft.UpdateServices.Administration (in Microsoft.UpdateServices.Administration.dll).

.NET Framework

Requires .NET Framework 1.1.

See Also

ILicenseAgreement.IsAccepted
IUpdate.GetLicenseAgreement