Service.WpdProperty property
The WpdProperty property gets or sets a predefined WPD property for this Service object.
This property is read/write.
Syntax
WpdProperty = Service.WpdProperty
Service.WpdProperty = WpdProperty
Property value
This property has 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 Service 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: service.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_SERVICE_VERSION | ServiceVersion |
Examples
The following JScript example demonstrates how to get and set the predefined WPDProperty "ServiceVersion".
var service = deviceObject.Services[ServicePUID];
// Get a value from the predefined WPD property "ServiceVersion".
// Notice that the property is called by using the Property Name,
// not the WPD PROPERTYKEY.
var serviceVersion = service.ServiceVersion;
// Set the WPD property to a new value.
service.ServiceVersion = "New Service Version";
Requirements
Minimum supported client |
Windows 7 [desktop apps only] |
Minimum supported server |
Windows Server 2008 R2 [desktop apps only] |