This is a multi-part message in MIME format.

------=_NextPart_000_000A_01C3C881.4AC8DD00
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I have this script below that I wrote that populates the contact list in =
Exchange Messenger. As seen, the list is stored in the registry under =
HKCU\Software\Microsoft\Exchange\Messenger\Profiles\http://bbhtx.org/inst=
msg/aliases/[USERNAME]\Contacts\. As I am new to registry scripting, I =
was wondering what the best method to "clear out the contacts first". =
In other words, I want to make sure if there are any entries, that they =
get deleted first (this way the contact list doesn't keep all ex-users =
in it). =20

The two questions are where should I delete them at (ie do I just delete =
all of contacts or is there a method to delete all the entries in =
contacts) and two do I need to first test if they exist (ie if the =
contacts doesn't exist yet because the user hasn't been set up). =20

Any thoughts or infor would be appricated

Set WshShell=3D WScript.CreateObject("Wscript.Shell")
Set wnet=3DCreateObject("Wscript.Network")
strUsername=3D wnet.username

Set ObjOU=3D =
GetObject("LDAP://ou=3Dstaff,DC=3Dbaltimorebehavioralhealth,DC=3Dorg")

For Each ObjUser In ObjOU
If ObjUser.msexchIMaddress <> "" then=20
strreg=3D =
"HKCU\Software\Microsoft\Exchange\Messenger\Profiles\http://bbhtx.org/ins=
tmsg/aliases/" & strusername & "\Contacts\"
strKey=3D strreg & objUser.msexchIMaddress
WshShell.RegWrite strKey, objUser.msexchIMaddress
end if
next


--=20
Robert Cohen
A legend in his own mind
--

------=_NextPart_000_000A_01C3C881.4AC8DD00
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1276" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I have this script below that I wrote =
that=20
populates the contact list in Exchange Messenger.&nbsp; As =
seen,&nbsp;the list=20
is stored in the registry=20
under&nbsp;HKCU\Software\Microsoft\Exchange\Messenger\Profiles\http://bbh=
tx.org/instmsg/aliases/[USERNAME]\Contacts\.&nbsp;=20
As I am new to registry scripting, I was wondering what the best method =
to=20
"clear out the contacts first".&nbsp; In other words, I want to make =
sure if=20
there are any entries, that they get deleted first (this way the contact =
list=20
doesn't keep all ex-users in it).&nbsp; </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The two questions are where should I =
delete them at=20
(ie do I just delete all of contacts or is there a method to delete all =
the=20
entries in contacts) and two do I need to first test if they exist (ie =
if the=20
contacts doesn't exist yet because the user hasn't been set up).&nbsp;=20
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Any thoughts or infor would be=20
appricated</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Set WshShell=3D=20
WScript.CreateObject("Wscript.Shell")<BR>Set=20
wnet=3DCreateObject("Wscript.Network")</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>strUsername=3D =
wnet.username</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Set ObjOU=3D GetObject("<A=20
href=3D"ldap://ou=3Dstaff,DC=3Dbaltimorebehavioralhealth,DC=3Dorg">LDAP:/=
/ou=3Dstaff,DC=3Dbaltimorebehavioralhealth,DC=3Dorg</A>")</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>For Each ObjUser In ObjOU<BR>If=20
ObjUser.msexchIMaddress &lt;&gt; "" then </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>strreg=3D=20
"HKCU\Software\Microsoft\Exchange\Messenger\Profiles\http://bbhtx.org/ins=
tmsg/aliases/"=20
&amp; strusername &amp; "\Contacts\"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>strKey=3D strreg &amp;=20
objUser.msexchIMaddress</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>WshShell.RegWrite strKey,=20
objUser.msexchIMaddress<BR>end if<BR>next<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><BR>-- <BR>Robert Cohen<BR>A legend in =
his own=20
mind<BR>--<BR></FONT></DIV></BODY></HTML>

------=_NextPart_000_000A_01C3C881.4AC8DD00--