Share via


Storage.WpdProperty property

The WpdProperty property gets or sets a predefined WPD property on this Storage object.

This property is read/write.

Syntax

WpdProperty = Storage.WpdProperty
Storage.WpdProperty = WpdProperty

Property value

The same value as the predefined WPD property that is being read from or written to.

Remarks

The following table contains the minimum required set of predefined WPD properties for a Storage Object. The properties are accessed by the WPD Automation name that corresponds to the WPD PROPERTYKEY. For example, the WPD-defined property WPD_OBJECT_NAME, would be accessed like this: storage.ObjectName.

For a complete list of WPD PROPERTYKEYs and their corresponding WPD Automation names, see Names for WPD PROPERTYKEYs.

WPD PROPERTYKEY WPD Automation Name
WPD_OBJECT_ID ObjectId
WPD_OBJECT_NAME ObjectName
WPD_OBJECT_PERSISTENT_UNIQUE_ID ObjectPersistentUniqueId
WPD_OBJECT_FORMAT ObjectFormat
WPD_FUNCTIONAL_OBJECT_CATEGORY FunctionalObjectCategory
WPD_STORAGE_TYPE StorageType
WPD_STORAGE_CAPACITY StorageCapacity

Examples

The following JScript example demonstrates how to get and set predefined WPD properties on a storage.

var storage = deviceObject.Storages[0];

// Retrieve a value from a predefined WPD property.
// Notice that the property is called by using the 
// WPD Automation Property Name.
var storageType = storage.StorageType;

// Set a predefined WPD property to a new value.
storage.ObjectName = "New Storage Name";

Requirements

Minimum supported client
Windows 7 [desktop apps only]
Minimum supported server
Windows Server 2008 R2 [desktop apps only]

See also

Storage Object