So here is a quick tutorial on making an ActiveSync cab file.
This will provision ActiveSync settings (For connecting to an Exchange server) for OTA and cradle syncing.
The source code is below, I'll explain that first.
- First we open our Wap-provisioning XML code (<wap-provisioningdoc>)
- Then we let the device know we are utilising the "Sync" configuration service provider. (<characteristic type="Sync">)
- Then we let the device know that we are going to change items under the Settings structure (<characteristic type="Settings">)
- We want to enable Synchronisation when we are roaming (As often the phone thinks we are roaming when changing from GPRS to 3g etc. You may want to leave this out if you don't want to sync when roaming.)
- Next we configure our connection settings (<characteristic type="Connection">) Domain, Password, User, Server, UseSSL etc.
Configure these to match your exchange server. If you don't use SSL for activesync, don't enable this.
And i don't recommend putting your password in either, as this will stored clear text in your cab file.
Now for the Mail, Calendar and Contacts settings, We enable them all (Enable=1) We set the age filters on Mail and Calendar. 3 and 5 on my device set the Calendar to 1 month and email to 1 week. How ever this seems to differ from device to device so have a play.
Basically, we want to take the source code - In this example:
<wap-provisioningdoc>
<characteristic type="Sync">
<characteristic type="Settings">
<parm name="SyncWhenRoaming" value="1"/>
</characteristic>
<characteristic type="Connection">
<parm name="Domain" value="company"/>
<parm name="Password" value="password"/>
<parm name="SavePassword" value="1"/>
<parm name="Server" value="mail.company.com"/>
<parm name="User" value="Joe Bloggs"/>
<parm name="URI" value="Microsoft-Server-ActiveSync"/>
<parm name="UseSSL" value="1"/>
</characteristic>
<characteristic type="Mail">
<parm name="Enabled" value="1"/>
<parm name="EmailAgeFilter" value="3"/>
</characteristic>
<characteristic type="Calendar">
<parm name="Enabled" value="1"/>
<parm name="CalendarAgeFilter" value="5"/>
</characteristic>
<characteristic type="Contacts">
<parm name="Enabled" value="1"/>
</characteristic>
</characteristic>
</wap-provisioningdoc>
Put this into NOTEPAD. We cannot have any text formatting on this, so word is out of the question, just straight notepad.
Save this as _setup.xml from the notepad save as menu. If you can't save as xml, then change the file extension after you save it as a .txt.
The name of the file - _setup.xml is important.
You can change around the below instructions, but this should make it easier for people who are new to compiling cabs
- Save your _setup.xml to a directory called C:\Cabs\ on your computer.
- Now open up a command prompt window Start>Run>cmd.
- Type cd C:\Cabs in the command prompt window
- Type MakeCAB.exe /D COMPRESS=OFF _setup.xml ActiveSync.cab
Now you will have an ActiveSync.cab file in your C:\Cabs directory.
Launch this on your device and the settings will be provisioned. This have been tested on WM5 PocketPC and WM6 Professional.
I will attach the source ActiveSync.cab. But this will configure your device to the settings ive shown above (These can easily be removed from the device, so no biggy.)