A few things of interest (having recently done this exercise):

First off, the default profile's key should be used instead of hard coding "MS Exchange Settings"

Code:

$regkey="HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\"
$prof=ReadValue($regkey,"DefaultProfile")
if @ERROR = 0
$regkey=$regkey+$prof+"\"



Secondly, Outlook 2003 uses a binary value in "001f6700" (instead of "001e6700"). I used the RegHexToASCII UDF to "do the right thing" to these values.


Edited by PRandal (2004-11-30 03:15 PM)