Share via


Changing a Registry Setting Example

4/8/2010

The Replace command is used to change a device registry setting.

Code Example

The following example illustrates how to use the Replace command to change a device Registry setting. In this example, the current SampleKey value is replaced by the value specified in the command by the <Data> element.

<SyncHdr>
  <VerDTD>1.1</VerDTD>
  <VerProto>DM/1.1</VerProto>
  <SessionID>1</SessionID>
  <MsgID>1</MsgID>
  <Target>
    <LocURI>{unique device ID}</LocURI>
  </Target>
   <Source>
     <LocURI>https://www.thephone-company.com/mgmt-server</LocURI>
   </Source>
</SyncHdr>
<SyncBody>
   <!-- change a registry setting -->
   <Replace>
     <CmdID>2</CmdID>
     <Item>
       <Target>
          <LocURI>./Vendor/MSFT/Registry/SampleKey</LocURI>
       </Target>
       <Data>16</Data>
     </Item>
   </Replace>
   <Final />
</SyncBody>

See Also

Concepts

OMA DM Provisioning XML File Examples