ApplicationSpecificDataItem.Value property

The Value property specifies or retrieves the value portion of a name-value pair.

Syntax

ApplicationSpecificDataItem.Value

Property value

This property specifies or retrieves a string.

Remarks

The value can be used in conjunction with the Name property to identify additional information to be added to a rights template.

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

' *******************************************************************
' Create a template and add it to the template collection. 

SUB ExcludeApplication()

  DIM templateMgr
  DIM templateColl
  DIM templateObj

  ' Retrieve the RightsTemplatePolicy object.
  SET templateMgr = config_manager.RightsTemplatePolicy
  CheckError()

  ' Retrieve the rights template collection.
  SET templateColl = templateMgr.RightsTemplateCollection
  CheckError()

  ' Retrieve the first template in the collection.
  SET templateObj = templateMgr.RightsTemplateCollection.Item(0)
  CheckError()

  ' Create and add a name-value pair to the template.
  SET appData = CreateObject( "Microsoft." _
      & "RightsManagementServices.Admin.ApplicationSpecificDataItem")
  appData.Name = "xxx"
  appData.Value = "yyy"
  templateObj.ApplicationSpecificDataItems.Add( appData )
  CheckError()

  ' Update the templates on the server.
  templateMgr.RightsTemplateCollection.Update( templateObj )
  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
Microsoft.RightsManagementServices.Admin.dll

See also

ApplicationSpecificDataItem