View Single Post
  #1 (permalink)  
Old 08-13-2009, 01:51 PM
elephant007's Avatar
elephant007
domo arigato mr roboto
Offline
 
Join Date: Jan 2007
Posts: 1,248
Reputation: 3584
elephant007 is still contributing even after becoming a VIPelephant007 is still contributing even after becoming a VIPelephant007 is still contributing even after becoming a VIPelephant007 is still contributing even after becoming a VIPelephant007 is still contributing even after becoming a VIPelephant007 is still contributing even after becoming a VIPelephant007 is still contributing even after becoming a VIPelephant007 is still contributing even after becoming a VIPelephant007 is still contributing even after becoming a VIPelephant007 is still contributing even after becoming a VIPelephant007 is still contributing even after becoming a VIP
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Cool HOW TO: Auto Accept Exchange Policy (HTC Only?)

I finally figured out how to get my phone to auto accept exchange policies (Toast) without having to press OK after reflashing my phone, below is the proceedure

1. Download the attached filed labled "Elephant007PolicyToastAccept.cab"
2. Copy the following code to notepad and change the entries that are all capitols to your information
The code below will automatically download entire message and attachements... I've also scheduled peak times when to sync and excluded syncing tasks... if you wish to sync tasks change from 0 to 1
Code:
<?xml version="1.0"?>
<wap-provisioningdoc>
<!--  *** Start Personalized Exchange/ActiveSync Settings ***--> 
<!--  *** Start Exchange Settings *** --> 
<characteristic type="Sync">
<characteristic type="Connection">
  <parm name="Server" value="EXTERNAL-EXCHANGE-SERVER-ADDRESS" /> 
  <parm name="AllowSSLOption" value="1" /> 
  <parm name="User" value="COMPLETE-EMAIL-ADDRESS" /> 
  <parm name="Domain" value="" /> 
  <parm name="Password" value="PASSWORD" /> 
  <parm name="SavePassword" value="1" /> 
  </characteristic>
<!--  *** Start Configure Peak Times, M-F 8:00AM-5:00PM ***--> 
<characteristic type="Settings">
  <parm name="PeakStartTime" value="0800" /> 
  <parm name="PeakEndTime" value="1700" /> 
  <parm name="PeakFrequency" value="-1" /> 
  <parm name="BodyTruncation" value="-1" /> 
<characteristic type="PeakDays">
  <parm name="Sun" value="0" /> 
  <parm name="Mon" value="1" /> 
  <parm name="Tue" value="1" /> 
  <parm name="Wed" value="1" /> 
  <parm name="Thr" value="1" /> 
  <parm name="Fri" value="1" /> 
  <parm name="Sat" value="0" /> 
  </characteristic>
  </characteristic>
<!--  *** End Configure Peak Times ***--> 
<characteristic type="Mail">
  <parm name="Enabled" value="1" /> 
  <parm name="MailBodyTruncation" value="-1" /> 
  <parm name="MailFileAttachments" value="-1" /> 
  </characteristic>
<characteristic type="Calendar">
  <parm name="Enabled" value="1" /> 
  </characteristic>
<characteristic type="Contacts">
  <parm name="Enabled" value="1" /> 
  </characteristic>
<characteristic type="Tasks">
  <parm name="Enabled" value="0" /> 
  </characteristic>
  </characteristic>
<!--  *** End Personalized Exchange/ActiveSync Settings ***--> 
  </wap-provisioningdoc>
Now after making all your changes in NOTEPAD, copy and then go to this site http://supware.net/CabGen/, remove their code and paste yours in, I named mine Exchange.cab... save it to your computer

Now store your two cab files on your SDCard so you can use UC to call them up...

3. Copy this script and put on your SDCard, I've named mine Tweak01.mscr
MORTSCRIPT
Code:
Call ("SilentInstall", "\Storage Card\Config\Cabs\Exchange.cab")
Sub SilentInstall
  fd=argv[1]
  runwait("\Windows\wceload.exe", """" & fd & """ /noui /nodelete")
EndSub
Delete("Windows\Startup\Tweak01.mscr")
Add this to your SDCONFIG.TXT for use with UC
Here is a snippet of my SDConfig.txt code
Code:
CAB: \Storage Card\Config\Cabs\Elephant007PolicyToastAccept.cab
CPY1:\Storage Card\Config\Files\Tweak01.mscr
CPY2:\Windows\StartUp\Tweak01.mscr
Basically what this does is installs HTCApplication Service on your device which must be installed and running before your device will auto accept the policies pushed down from your Exchange Server. The phone will reboot before installing the Exchange.cab file which configures your exchange account on the phone. Since the phone reboots first, it gives HTCApplication the opportunity to start thus causing everything to work!!

It took me a while to finally figure this out, here you have it in a short thread!!



edit:
Test on HTC Touch Pro device
Attached Files
File Type: cab Elephant007PolicyToastAccept.cab (126.9 KB, 1 views) Click for barcode!

Last edited by elephant007; 08-13-2009 at 02:13 PM.
Reply With Quote
This post has been thanked 2 times.