Share via


Using Windows Mobile CSP (Sync Configuration Service Provider)

Microsoft has made it pretty easy for you to write an XML document with all your settings and just run it on your device.  In this article we are going to cover what and XML CSP file is as well as how to get one to run on your Windows Mobile device.  

What is a CSP File?
Most people think you need to edit the registry to make changes to a Windows Mobile Device if you can't make the changes via the GUI (Graphical User Interface) but that isn't the case.  Since Windows Mobile Devices support Over the Air Provisioning (OTA), Microsoft had to make a way for the device to receive a set of settings and then apply them to the device without having to edit the registry directly.  The way that they do this is by sending an XML document to the device which contains all these settings and those settings are applied to the device.  This XML file is also called a CSP file. 

What does a CSP file look like?

Well here is an example found here:
https://msdn.microsoft.com/library/default.asp?...

I've edited it to make it a bit shorter and left out some of the settings in the Example XML file.  It is clear where one can enter Username, Password and Domain for this Activesync CSP.  Once you edit the Sample XML with the settings you would like to put on your Windows Mobile device you will have a CSP file that you can use.  

<Atomic>
   <CmdID>1</CmdID>
   <Replace>
      <CmdID>3</CmdID>
      <Item>
         <Target>
            <LocURI>./Vendor/MSFT/Sync/Connection/User</LocURI>
         </Target>
         <Meta>
            <Format xmlns="syncml:metinf">chr</Format>
         </Meta>
         <Data>Username</Data>  
      </Item>
      <Item>
         <Target>
            <LocURI>./Vendor/MSFT/Sync/Connection/Server</LocURI>
         </Target>
         <Meta>
            <Format xmlns="syncml:metinf">chr</Format>
         </Meta>
         <Data>Servername</Data>  
      </Item>
      <Item>
         <Target>
            <LocURI>./Vendor/MSFT/Sync/Connection/Domain</LocURI>
         </Target>
         <Meta>
            <Format xmlns="syncml:metinf">chr</Format>
         </Meta>
         <Data>Domainname</Data>  
      </Item>
    </Replace>
</Atomic>

How do I use the CSP File?
Unfortunatly once you are done creating the CSP file all you will just have an XML file with a  .XML extention. You will then need to create a CAB file that you can run on the Device.  To accomplish this you will need to get a file called Makefile.exe.  You can obtain that file here:
https://support.microsoft.com/kb/310618
Download Cabsdk.exe and uncompress it.  In the BIN directory you will find Makecab.exe.  Copy Makecab.exe to the same directory at the .XML CSP file you created.

Run the following command: 
C:\makecab.exe C:\myfile.xml C:\myfile.cab
Once you create this .CAB file you can run it on your device and it will change the settings to the settings in your .XML CSP file.

Here is a small list of Example CSPs that are available for Windows Mobile as well as links to more information on them.
MSDN link to CSPs
https://msdn.microsoft.com/library/...

MSDN link Listing the Configuration Service Provider for Windows Mobile-Based Devices
https://msdn.microsoft.com/library/... 

Tag this article:  

Del.icio.us Logo del.icio.us  Digg Logo digg   reddit Logo reddit   Furl Logo Furl   Blinklist Logo Blinklist  Technorati Logo Technorati

Comments

  • Anonymous
    September 21, 2006
    Thanks, very helpful, I'll give it a try!

  • Anonymous
    January 22, 2007
    Hi Vik, Good article.  I've been using CSP's to allow me to quickly restore my settings if I get a new ROM for my device etc. Something I've been unable to find in the MSDN docs though is reference to synchronisation of Tasks.  The ActivSync CSP makes no mention of this option and trying to create a characteristic of 'Tasks' does not seem to work. Any ideas (or does it have to be done using the Registry CSP?) Cheers, Nigel

  • Anonymous
    January 22, 2007
    Hi Vik, Good article.  I've been using CSP's to allow me to quickly restore my settings if I get a new ROM for my device etc. Something I've been unable to find in the MSDN docs though is reference to synchronisation of Tasks.  The ActivSync CSP makes no mention of this option and trying to create a characteristic of 'Tasks' does not seem to work. Any ideas (or does it have to be done using the Registry CSP?) Cheers, Nigel

  • Anonymous
    June 12, 2007
    It appears that a new feature in Exchange 2007 finally allows us to only allow provisioned (or Authorized)