Freigeben über


Windows Media Rights Manager SDK banner art

Protecting the Windows Media File

The last step in packaging a Windows Media file is to protect it, which means encrypting the Windows Media file with a key .

At this point, you can add information to support players that support only Windows Media Rights Manager 1. Such players cannot read the content header, so they cannot trigger license acquisition and send the appropriate license request. Instead, you can add the following items to the Windows Media file outside of the content header:

  • Version 1 license acquisition URL, which points to the first page in the license acquisition process for issuing version 1 licenses.

    Or, you can specify a player upgrade URL. If you want to actively encourage your consumers to upgrade their players (for instance, if your Windows Media files require an individualized player), you can specify a version 1 license acquisition URL that points to a location where consumers can upgrade their players. By default, if you do not specify a version 1 license acquisition URL, a URL is used that points to a Web page where consumers can download a player that supports version 7 or later.

  • Version 1 key ID, which should be the same key ID that is put into the content header for version 7 or later.

The following Visual Basic Scripting Edition (VBScript) code example shows how to protect a Windows Media file.

VBScript Example

ProtectObj.Header = header
ProtectObj.InputFile = inputfile
ProtectObj.Key = key
ProtectObj.V1LicenseAcqURL = v1_laurl
ProtectObj.V1KeyID = key_id
call ProtectObj.ProtectFile(outputfile)

See Also