IUpdate.GetLicenseAgreement()

Retrieves the license agreement for this update.

public ILicenseAgreement GetLicenseAgreement();
Public Function GetLicenseAgreement() As ILicenseAgreement
Implements IUpdate.GetLicenseAgreement

Parameters

This method has no parameters.

Return Values

An ILicenseAgreement that contains the text of the agreement and indicates if the agreement has been accepted and by whom.

Exceptions

Exception type Condition
System.InvalidOperationException The update does not have a license agreement. To determine if the update has an associated license agreement, call IUpdate.HasLicenseAgreement.
WsusObjectNotFoundException The update has a license agreement, but the agreement could not be found in the database. The license agreement must be downloaded before you can retrieve the agreement. To determine if the agreement has been downloaded, call IUpdate.State. The agreement is not downloaded if the state is UpdateState.LicenseAgreementNotReady or UpdateState.LicenseAgreementFailed.

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

IUpdate.HasLicenseAgreement