Version object
The Version object represents a version number in the format Major.Minor.Build.Revision. Version numbers are used by the ExcludedApplication and ExcludedLockbox objects.
Members
The Version object has these types of members:
Properties
The Version object has these properties.
Property | Description |
---|---|
Build |
Specifies or retrieves the build number. |
Major |
Specifies or retrieves the major version number. |
Minor |
Specifies or retrieves the minor version number. |
Revision |
Specifies or retrieves the revision number. |
Examples
' *******************************************************************
' Test version number creation.
SUB TestVersion()
DIM excludedApplication
DIM minVersion
DIM maxVersion
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
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
Requirements
Minimum supported client |
None supported |
Minimum supported server |
Windows Server 2008 |
Assembly |
|