Freigeben über


Provisioning XML Document for Registry Configuration Service Provider (Compact 2013)

3/26/2014

Configuration Manager uses this XML document to change registry settings on a Windows Embedded Compact powered device.

Syntax

<wap-provisioningdoc>
   <characteristic type="Registry">
      <characteristic type="<RegistryPath>">
      <parm name="<ParmName>" value="<ParmValue>" datatype="<DataType>" />
      <parm-query name="<ParmName>" />
      <noparm name="<ParmName>" />
    </characteristic>
    <characteristic-query type="<RegistryPath>" />
    <nocharacteristic type="<RegistryPath>" />
  </characteristic>
</wap-provisioningdoc>

Elements

Element name

Description

Attributes

characteristic

Groups settings for a configuration service provider

type

The type of group. It can be one of the following:

ValueDescription
RegistryIndicates the root characteristic element for the Registry configuration service provider.
<Registry_path>The registry path to the registry key.
translation

The translation to perform. It can be one of the following values.

Value Description
filesystemRemoves double backslashes from file paths.
installIncludes all the translations performed for "filesystem," and also translates all Windows Embedded Compact strings; for example, translates %CE% into the correct file path for the device.

parm

Metadata that describes a device setting.

name

The name of the registry key to configure.

value

The value of the registry key specified in the name attribute.

datatype

See Remarks.

translation

The translation to perform. It can be one of the following:

Value Description
filesystemRemoves double backslashes from file paths.
installIncludes all the translations done for "filesystem."

parm-query

Specifies a request for the current value of a setting.

name

Any supported name attribute that is listed above.

value

On return, contains the value of the setting provided in name.

noparm

In a request document, the setting to remove.

name

Any supported name attribute that is listed above.

nocharacteristic

In a request document, the settings to be removed from the device.

type

The registry path, which has associated values and keys, to remove.

characteristic-query

Use this element to query the setting values specified by the characteristic in the type attribute.

type

Any supported type attribute that is listed above.

recursive

Set to TRUE or omit this attribute to recursively query the tree under the characteristic.

Set to FALSE to query only settings nested one level from the starting point.

Remarks

To change registry settings on the device, you can write a provisioning file that you customize for the Registry configuration service provider. However, the Registry configuration service provider supports only a subset of elements and its own attribute values for the characteristic and parm elements.

For more information about elements, see Provisioning XML Document.

Although you can update the registry by using .reg files, we recommend that you update the registry by using this XML document.

You cannot query the registry at the top level. All parameters must be queried individually.

You must use a datatype attribute with each parm element that represents a registry setting. The following table shows the possible values for datatype.

datatype value

Registry type

Description

integer

REG_DWORD

Integer. A query of this parameter returns an integer type.

Boolean

REG_DWORD

Integer value of 1 or 0 (zero). A query of this parameter returns an integer type.

float

REG_SZ

Float. A query of this parameter returns a string type.

string

REG_SZ

String. A query of this parameter returns a string type.

multiplestring

REG_MULTI_SZ

Multiple strings are separated by &#xF000; and ended with two &#xF000; - for example:

<parm name="Color" value="Red&#xF000;Blue&#xF000;Green&#xF000;Yellow&#xF000;&#xF000;" datatype="multiplestring" />

A query of this parameter returns a multiplestring type.

binary

REG_BINARY

Base64 encoded. A query of this parameter returns a binary type.

time

FILETIME in REG_BINARY

The time format conforms to the ISO 8601 standard, with the date portion optional. If you omit the date portion, also omit the "T" delimiter. A query of this parameter returns a binary type.

date

FILETIME in REG_BINARY

The date format conforms to the ISO 8601 standard, with the time portion optional. If you omit the time portion of the date, also omit the "T" delimiter. A query of this parameter returns a binary type.

Example

The following example code adds a registry key (HKEY_CURRENT_USER\Software\Microsoft\TestKey3), adds values to the key, and then modifies one of the values (TestValue).

Note

For readability, the following code example does not contain security checking or error handling. Do not use the following code in a production environment.

<wap-provisioningdoc>
 <characteristic type="Registry">
  <characteristic type="HKCU\Software\Microsoft\TestKey3">
    <parm name="TestValue" value="5" datatype="integer" />
    <parm name="TestValueBoolean" value="1" datatype="boolean" />

    <!-- boolean is stored as an integer in the registry -->
    <parm name="TestValueString" value="testtesttest"
    datatype="string" />
    <parm name="TestValueDateTime1" value="2001-10-20"
    datatype="date" />

    <!-- time contains the time and time zone -->
    <parm name="TestValueDateTime2" value="16:55:04-08"
    datatype="time" />
    <parm name="TestValueString2"
    value="string1&#xF000;string2&#xF000;string3&#xF000;&#xF000;" datatype="multiplestring" />

    <!-- multiple strings are  separated by &#xF000; -->
    <!-- multiple strings are ended with two &#xF000; -->
    <parm name="TestValueInteger"
    value="5iAGkAbgBhAHIAeQAgAGIAbABvAG" datatype="binary" />
  </characteristic>
 </characteristic>
</wap-provisioningdoc>

See Also

Reference

Configuration Service Provider Reference
IConfigManager