Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The ExcludedApplication object represents an application that is prohibited from decrypting RMS-protected content. An excluded application cannot obtain a new end-user license by using formerly valid rights account certificates or issuance licenses. You can enable this functionality to make sure that users install a newer, more secure version of an application when one becomes available. RMS-enabled applications are excluded by name and version number.
Members
The ExcludedApplication object has these types of members:
Properties
The ExcludedApplication object has these properties.
Property | Description |
---|---|
AppName |
Specifies or retrieves the name of the excluded application. |
MaximumVersion |
Specifies or retrieves the maximum version number. |
MinimumVersion |
Specifies or retrieves the minimum version number. |
Examples
DIM config_manager
DIM admin_role
' *******************************************************************
' Create and initialize a ConfigurationManager object.
SUB InitObject()
CALL WScript.Echo( "Create ConfigurationManager object...")
SET config_manager = CreateObject _
("Microsoft.RightsManagementServices.Admin.ConfigurationManager")
CheckError()
CALL WScript.Echo( "Initialize...")
admin_role=config_manager.Initialize(false,"localhost",80,"","","")
CheckError()
END SUB
' *******************************************************************
' Exclude an application
SUB Exclude()
DIM exclusionPolicy
DIM excludedAppColl
DIM excludedApplication
DIM minVersion
DIM maxVersion
' Retrieve the ExclusionPolicy object.
SET exclusionPolicy = config_manager.Enterprise.ExclusionPolicy
CheckError()
' Retrieve the collection of exclusion policies.
Set excludedAppColl = exclusionPolicy.Applications
CheckError()
IF IsObject(excludedAppColl) <> TRUE THEN
CALL RaiseError(-810, "Cannot retrieve exclusion policies.")
END IF
' Exclude Notepad.exe.
SET excludedApplication = CreateObject( _
"Microsoft.RightsManagementServices.Admin.ExcludedApplication")
CheckError()
SET minVersion = CreateObject( _
"Microsoft.RightsManagementServices.Admin.Version")
SET maxVersion = CreateObject(_
"Microsoft.RightsManagementServices.Admin.Version")
CheckError()
minVersion.Major = 1
minVersion.Minor = 1
minVersion.Build = 1
minVersion.Revision = 1
maxVersion.Major = 1
maxVersion.Minor = 1
maxVersion.Build = 1
maxVersion.Revision = 1
excludedApplication.AppName = "Notepad.exe"
excludedApplication.MinimumVersion = minVersion
excludedApplication.MaximumVersion = maxVersion
' Add the excluded application to the collection.
excludedAppColl.Add( excludedApplication )
CheckError()
END SUB
' *******************************************************************
' Error checking function.
FUNCTION CheckError()
CheckError = Err.number
IF Err.number <> 0 THEN
CALL WScript.Echo( vbTab & "*****Error Number: " _
& Err.number _
& " Desc:" _
& Err.Description _
& "*****")
WScript.StdErr.Write(Err.Description)
WScript.Quit( Err.number )
END IF
END FUNCTION
' *******************************************************************
' Generate a runtime error.
SUB RaiseError(errId, desc)
CALL Err.Raise( errId, "", desc )
CheckError()
END SUB
Requirements
Minimum supported client |
None supported |
Minimum supported server |
Windows Server 2008 |
Assembly |
|