Automated purge of ActiveSync email?

thetao

Member
Sep 19, 2008
5
0
0
My back is against the wall, and I'm hoping someone has a creative idea on how to do this...

I am looking for a way to purge the ActiveSync email from a Windows Mobile 5/6 device through a combination of registry or file system settings, or perhaps some application, ie. something I could do with MortScript. Deleting the PIM data (calendar, contacts, tasks) is trivial...rename the pim.vol file, force a reboot, and have another Mortscript file waiting in \Windows\StartUp to then delete the old file. Email, on the other hand, is really, really hard. You can delete the email bodies and attachments in \Windows\Messaging, but the index remains in cemail.vol. I've read about one technique to outright delete cemail.vol, but this database also houses SMS messages, making this a bad idea.

Then I found the Registry value ClientReset, located in HKCU\Software\Microsoft\ActiveSync\Partners\{GUID}, which does exactly what I want...except that it doesn't have an effect when the program that stored the email was written instead by a third party, and just borrowing the ActiveSync message store. I can set up an ActiveSync connection, wait until it starts to sync, cancel it, then make sure ClientReset=1, and re-sync...but the purpose of the project is to automate the process. It seems ActiveSync is looking in one of the *.vol files for its cue to obey ClientReset, but even if I could find the value, folder, whatever, I know of no way to change the databases through scripting.

Has anybody been able to do this, or does anyone have ideas?

Many thanks for your suggestions!
Todd