Adding a Key and Values, and Modifying a Value Example

4/8/2010

You can use the Registry configuration service provider to add keys and values to the registry, or to modify the registry.

Code Example

This example adds a registry key (Registry\HKLM\Software\Microsoft\TestKey3), adds values to the key, and then modifies one of the values (TestValue).

<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>

Remarks

One provisioning XML file typically contains configuration information for multiple configuration service providers. To use this example, you must replace the values as appropriate, and add the node as a child of the OMA Client Provisioning file.** For information about the syntax of this file, see OMA Client Provisioning Files. For examples, see OMA Client Provisioning XML File Examples.**

See Also

Tasks

Registry Configuration Service Provider Examples for OMA Client Provisioning

Reference

Changing Registry Settings by Using the Registry Configuration Service Provider