Device.WpdProperty property

The WpdProperty gets or sets the value of a device property.

This property is read/write.

Syntax

strWpdProperty = Device.WpdProperty
Device.WpdProperty = strWpdProperty

Property value

String that is the name of a property on the device.

Remarks

The following table shows the mapping between WPD PROPERTYKEYs and their equivalent WPD Automation names. The Device.WpdProperty property uses the WPD Automation property name on the right that corresponds to a WPD PROPERTYKEY on the left. For example, the WPD-defined property WPD_DEVICE_MANUFACTURER is accessed by using the corresponding WPD Automation property name, like this: deviceObject.DeviceManufacturer

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_DEVICE_FIRMWARE_VERSION DeviceFirmwareVersion
WPD_DEVICE_MANUFACTURER DeviceManufacturer
WPD_DEVICE_MODEL DeviceModel
WPD_DEVICE_SERIAL_NUMBER DeviceSerialNumber
WPD_DEVICE_POWER_LEVEL DevicePowerLevel
WPD_DEVICE_POWER_SOURCE DevicePowerSource
WPD_DEVICE_PROTOCOL DeviceProtocol
WPD_DEVICE_SUPPORTS_NON_CONSUMABLE DeviceSupportsNonConsumable
WPD_DEVICE_FRIENDLY_NAME DeviceFriendlyName
WPD_DEVICE_TYPE DeviceType
WPD_DEVICE_NETWORK_IDENTIFIER DeviceNetworkIdentifier

Examples

The following JScript example uses WpdProperty to obtain the name, model, and manufacturer of the device.

var name = deviceObject.ObjectName;
var manufacturer = deviceObject.DeviceManufacturer;
var model = deviceObject.DeviceModel;

Requirements

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

See also

Device Object