Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
4/8/2010

The preferred method for accessing the registry is by using the configuration service providers. The Registry configuration service provider allows you to change many registry settings that are not supported in other configuration service providers.

Before you change registry settings, you may need to determine what the current registry settings are on the device. You can do this by using the Registry configuration service provider to query the device. For more information see Querying Registry Settings by Using the Registry Configuration Service Provider.

The examples provided can be used as templates to configure settings for the Registry configuration service provider. To use an example, you must replace the values as appropriate. To use an OMA DM example, you must also add the node as a child of the SyncBody node in an OMA DM provisioning file. For more information about the syntax of the provisioning file, see OMA DM Provisioning Files.

Note:
When using OMA DM to add a registry key, a child registry value must also be added in the XML code.

Changing a Registry setting using OMA DM Provisioning

The following example updates the home screen TimeOut setting.

Copy Code
<Replace>
  <CmdID>1</CmdID>
  <Item>
	<Meta>
	<Format xmlns="syncml:metinf">int</Format>
	</Meta>
	<Target>
	 
<LocURI>./Vendor/MSFT/Registry/HKCU/ControlPanel/Home/TimeOut</LocURI>
	</Target>

  <Data>600000</Data>
  </Item>
</Replace>

As shown in this example, you use the <Replace> element to change the current value of a Registry setting. To use this example as a template, you must change the following:

  • Change the information in the <LocURI> element to the correct path to the setting.

    Note:
    This is the path in the portion of the device DM tree that contains registry information. You must provide the entire path, including the root (./Vendor/MSFT/Registry/HKCU).
  • Change the information in the <Data> element to the new value.

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 SyncBody node in an OMA DM provisioning file. For more information about the syntax of the provisioning file, see OMA DM Provisioning Files.

Changing a Registry Setting Using OMA Client Provisioning

The following example updates the home screen timeout setting with a new value.

Copy Code
<characteristic type="Registry">
   <characteristic type="HKCU\ControlPanel\Home">
	<parm name="TimeOut" value="600000"
datatype="integer"/>
   </characteristic>
</characteristic>

As shown in this example, the first <characteristic>element indicates that the Registry configuration service provider will process this XML. To use this example as a template, you must change the following:

  • Change the information in the second <characteristic>element to the path in the Registry that you want to change. In this case, it is set to the Home screen settings.

  • Change the information in the nameattribute of the <parm>element to the setting to be changed.

  • Change the information in the nameattribute of the <parm>element to the setting to be changed.

  • Change the valueattribute of the <parm>element to the new value.

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