Join | Sign in to Windows Live ID
in Search
LIKE WHAT YOU SEE? CLICK JOIN ABOVE TO SIGN UP, POST, AND ATTEND LIVE EVENTS.

Configure Exchange ActiveSync via Cab file

Last post 11-10-2008 11:19 AM by Laura Rooke. 19 replies.
Page 1 of 2 (20 items) 1 2 Next >
Sort Posts: Previous Next
  • 05-12-2008 4:59 PM

    • davidc
    • Top 10 Contributor
    • Joined on 05-02-2008
    • Sydney
    • Posts 266
    • Points 2,939
    • 2_advocate
      Small Business Specialist
      Specialist

    Configure Exchange ActiveSync via Cab file

     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.

    1. First we open our Wap-provisioning XML code (<wap-provisioningdoc>)
    2. Then we let the device know we are utilising the "Sync" configuration service provider. (<characteristic type="Sync">)
    3. Then we let the device know that we are going to change items under the Settings structure (<characteristic type="Settings">)
    4. 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.)
    5. 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

    1. Save your _setup.xml to a directory called C:\Cabs\   on your computer.
    2. Now open up a command prompt window Start>Run>cmd.
    3. Type cd C:\Cabs in the command prompt window
    4. 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.)

    Current Device - HTC Touch Pro- Ask me about this device
    • Post Points: 20
  • 05-12-2008 5:04 PM In reply to

    • Laura Rooke
    • Top 10 Contributor
    • Joined on 03-27-2008
    • Northern California
    • Posts 1,557
    • Points 16,190
    • 3_expert
      Microsoft Windows Mobile MVP
      Moderator
      Small Business Specialist
      Specialist

    Re: Configure Exchange ActiveSync via Cab file

    David - thanks so much for this - I cannot test it myself as I do not sync with an Exchange server.

    Laura Rooke
    MVP - Mobile Devices
    My Devices..........
    IPAQ 3650
    IPAQ 5450
    IPAQ 4700
    IPAQ 2795
    Jasjar
    Motorola Q
    T-Mobile Dash
    AT&T TILT
    • Post Points: 10
  • 05-12-2008 5:07 PM In reply to

    • davidc
    • Top 10 Contributor
    • Joined on 05-02-2008
    • Sydney
    • Posts 266
    • Points 2,939
    • 2_advocate
      Small Business Specialist
      Specialist

    Re: Configure Exchange ActiveSync via Cab file

     

    Laura Rooke:

    David - thanks so much for this - I cannot test it myself as I do not sync with an Exchange server.

     

    Actually, you can You can run it on the device and then open activesync and confirm the settings.  You won't be able to synchronise with a server,  but you can set the settings. Then when you want to get rid of it,  Open activesync on the device, Select Menu and Options. And then delete the server source . (That is, if you just wanted to see the settings in action but not recieve mail..) 

    Edit: also Im going to update this with Vista specific instructions soon.
    Current Device - HTC Touch Pro- Ask me about this device
    • Post Points: 10
  • 05-13-2008 5:47 AM In reply to

    • Adam Z Lein
    • Top 10 Contributor
    • Joined on 05-02-2008
    • New York, NY
    • Posts 188
    • Points 2,442
    • 2_advocate

    Re: Configure Exchange ActiveSync via Cab file

    How would you include and install a security certificate along with this CAB?

    __________________
    Adam Z Lein
    -------
    Senior Editor
    pocketnow.com -- it's all about portability...
    http://www.pocketnow.com
    • Post Points: 15
  • 05-13-2008 3:03 PM In reply to

    • davidc
    • Top 10 Contributor
    • Joined on 05-02-2008
    • Sydney
    • Posts 266
    • Points 2,939
    • 2_advocate
      Small Business Specialist
      Specialist

    Re: Configure Exchange ActiveSync via Cab file

     Provisioning certificates in cab files is quite easy too. 

    I'll do a separate tutorial on that. But it is all XML provisioning, so basically you can just add the xml to the top of this cab file and it will include the certificate.

     

    I'll write up a certificate tutorial this afternoon. 

    Current Device - HTC Touch Pro- Ask me about this device
    • Post Points: 5
  • 05-14-2008 4:06 PM In reply to

    • davidc
    • Top 10 Contributor
    • Joined on 05-02-2008
    • Sydney
    • Posts 266
    • Points 2,939
    • 2_advocate
      Small Business Specialist
      Specialist

    Re: Configure Exchange ActiveSync via Cab file

    Adamz:

    How would you include and install a security certificate along with this CAB?

     

     

    Adamz. You'lle find the certificate install cab in the tutorials forum. you can encorporate it into this one and have one cab file. Send me a pm or post on here if you need a hand.

    Current Device - HTC Touch Pro- Ask me about this device
    • Post Points: 5
  • 05-14-2008 5:43 PM In reply to

    • yrless
    • Top 10 Contributor
    • Joined on 05-02-2008
    • Central Ohio
    • Posts 496
    • Points 5,279
    • 2_advocate
      Small Business Specialist
      Specialist

    Re: Configure Exchange ActiveSync via Cab file

    Thanks Davidc...I was wondering the same thing!!

    Trent L. McMurray
    LAMARCOMM, LLC
    "Mobility Simplified"
    • Post Points: 10
  • 05-14-2008 5:53 PM In reply to

    • davidc
    • Top 10 Contributor
    • Joined on 05-02-2008
    • Sydney
    • Posts 266
    • Points 2,939
    • 2_advocate
      Small Business Specialist
      Specialist

    Re: Configure Exchange ActiveSync via Cab file

    No worries.

     

    If there is anything else you want to see explained let me know.

     

     

    Current Device - HTC Touch Pro- Ask me about this device
    • Post Points: 10
  • 05-14-2008 7:21 PM In reply to

    • CRC
    • Top 25 Contributor
    • Joined on 05-08-2008
    • Australia
    • Posts 42
    • Points 405
    • 1_colleague
      Small Business Specialist
      Specialist

    Re: Configure Exchange ActiveSync via Cab file

    Can this method be used to automatically set up POP3 accounts too? As I'm constantly hard resetting my device and flashing different ROMs to my device, I could use this in my preconfig to finally set up my mail account automatically ;)

    At the moment, I've been exporting parts of the WM registry and converting them to XML files to use with the preconfig on the device - but I haven't found the right keys etc for mail yet...

    • Post Points: 10
  • 05-14-2008 7:36 PM In reply to

    • davidc
    • Top 10 Contributor
    • Joined on 05-02-2008
    • Sydney
    • Posts 266
    • Points 2,939
    • 2_advocate
      Small Business Specialist
      Specialist

    Re: Configure Exchange ActiveSync via Cab file

     I haven't tested it.

    But pop3 uses the EMAIL2 CSP.. Heres an example:

    <wap-provisioningdoc>
    <characteristic type="EMAIL2">
    <characteristic type="{4FE84006-9E8A-4158-864D-A2E1E98C3786}">
    <parm name="SERVICENAME" value="MyPOP" />
    <parm name="SERVICETYPE" value="POP3" />
    <parm name="INSERVER" value="popserver" />
    <parm name="OUTSERVER" value="smtpserver">
    <parm name="AUTHNAME" value="bobk" />
    <parm name="AUTHSECRET" value="password" />
    <parm name="DOMAIN" value="northwindtraders" />
    <parm name="REPLADDR" value="bobk@northwindtraders.com" />
    </characteristic>
    </characteristic>
    </wap-provisioningdoc>

     

    Current Device - HTC Touch Pro- Ask me about this device
    • Post Points: 10
  • 05-15-2008 1:08 AM In reply to

    • CRC
    • Top 25 Contributor
    • Joined on 05-08-2008
    • Australia
    • Posts 42
    • Points 405
    • 1_colleague
      Small Business Specialist
      Specialist

    Re: Configure Exchange ActiveSync via Cab file

    Hmmm - thanks for that info. Do you happen to know if there is a different XML element to turn on SSL for incoming and outgoing email?

    • Post Points: 10
  • 05-15-2008 3:01 PM In reply to

    • davidc
    • Top 10 Contributor
    • Joined on 05-02-2008
    • Sydney
    • Posts 266
    • Points 2,939
    • 2_advocate
      Small Business Specialist
      Specialist

    Re: Configure Exchange ActiveSync via Cab file

    Sure,  once again, not tested but -

    <wap-provisioningdoc>
    <characteristic type="EMAIL2">
    <characteristic type="{GUID}">
    <parm name="SERVICENAME" value="example.com"/>
    <parm name="SERVICETYPE" value="POP3"/>
    <parm name="INSERVER" value="mail.example.com"/>
    <parm name="OUTSERVER" value="mail.example.com"/>
    <parm name="AUTHREQUIRED" value="1"/>

    <characteristic type="TAGPROPS">
    <parm name="8128000B" value="1"/>
    <parm name="812C000B" value="1"/>
    </characteristic>

    <parm name="AUTHNAME" value="someone@example.com"/>
    <parm name="AUTHSECRET" value="password"/>
    <parm name="REPLYADDR" value="someone@example.com"/>
    </characteristic>
    </characteristic>
    </wap-provisioningdoc>

     The 8128000B is for incoming SSL

    the 812C000B is for outgoing SSL 

    Current Device - HTC Touch Pro- Ask me about this device
    • Post Points: 15
  • 05-16-2008 12:22 AM In reply to

    • Gaute
    • Top 25 Contributor
    • Joined on 05-02-2008
    • Oslo, Norway
    • Posts 59
    • Points 625
    • 1_colleague
      Small Business Specialist
      Specialist

    Re: Configure Exchange ActiveSync via Cab file

    I'm using a device management solution to push these settings out, but I have two issues.

    With this setting I should have PIM come "when they arrive", but it ends up as "manual" in my timeplan: 

    <characteristic type="Sync">
          <characteristic type="Settings">
             <parm name="BodyTruncation" value="1024"/>
             <parm name="PeakStartTime" value="0800"/>
             <parm name="PeakEndTime" value="1800"/>
             <parm name="PeakFrequency" value="0"/>
             <parm name="AutoSyncWhenCradled" value="1"/>
             <parm name="SyncAfterTimeWhenCradled" value="120"/>
          </characteristic>

     Any ideas?

     Issue two:  How to set up Tasks? I've tried this, but that don't work:

     

          <characteristic type="Tasks">
             <parm name="Enabled" value="1"/>
          </characteristic>

     

    http://gauteweb.net/
    • Post Points: 15
  • 05-16-2008 12:50 AM In reply to

    • CRC
    • Top 25 Contributor
    • Joined on 05-08-2008
    • Australia
    • Posts 42
    • Points 405
    • 1_colleague
      Small Business Specialist
      Specialist

    Re: Configure Exchange ActiveSync via Cab file

    I did have an issue, however I've managed to resolve it... A handy hint in editing XML files is to load them in Internet Explorer. If you have the XML syntax incorrect (as I did), it will show you the error. IE won't load an xml file in display mode if this isn't correct. As an added benefit, the error message will point to the exact line where the error occurs.
    • Post Points: 5
  • 05-18-2008 3:33 PM In reply to

    • davidc
    • Top 10 Contributor
    • Joined on 05-02-2008
    • Sydney
    • Posts 266
    • Points 2,939
    • 2_advocate
      Small Business Specialist
      Specialist

    Re: Configure Exchange ActiveSync via Cab file

    Guate,

     

    The Tasks code you have there should work,  it seems to be fairly intermittant as to what devices it actually works on.

    The specific device i was writing it for the code didn't work, so i didn't include it in the tutorial.

    Theres no MS reference that i can find for the Tasks CSP,  however there is some around on the web.

    Just make sure its in its own structure, and not beneath settings, or inbox etc..

    eg.

     

    <wap-provisioningdoc>
       <characteristic type="Sync">
    <characteristic type="Tasks">
             <parm name="Enabled" value="1"/>
          </characteristic>

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

    Current Device - HTC Touch Pro- Ask me about this device
    • Post Points: 5
Page 1 of 2 (20 items) 1 2 Next >
  * WANT TO LET SOMEONE KNOW ABOUT THE CONNECTION? SEND AN INVITATION! *