Changing the Default Address Book for all Domain Users in Outlook

S

Sputter_Out

After much searching and not coming up with much, I've worked out a
way of setting this centrally from login scripts - it's a bit messy
though and you'll need some tools available to your users centrally.

1. Download a registry modification monitor. Run it, get a dump of
the HKEY_USERS area of the registry (this is where the information is
kept). I used SpyMeTools as it's free!

2. Change your default address book to the one you want to use in
Outlook. In OL2003, this is done through "Tools", "Address Book",
"Tools", "Options".

3. Run another dump of the HKEY_USERS, then compare the two files.
You should see a registry key modified in HKEY_USERS\<USERSID>\Software
\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem
\Profiles\<PROFILENAME>\9207f3e0a3b11019908b08002b2a56c2
This is the one you want to change. Make a note of the Key Name and
the Value (the value will be a long hex number), save it away, you'll
need that later.

4. Now, here's the first limitation for this script to work! You
need to have a consistent Outlook Profile Name - I don't know of a way
to dynamically pull this from the registry. This isn't a problem in
our environment as all our users get standard Outlook Profiles from
running newprof at login. I'd certainly recommend that approach for
ease. Failing that I think the default name for user-created profiles
is "Outlook".

5. Here's the real problem. The registry key you need to modify is
dependent on the SID (not user name - that'd be far too easy!) of the
user logged in. You need to get that user's SID before you can make a
regfile that will fill in your info for you.

Here's a script that does this - you'll need to have SysInternals'
excellent psgetsid.exe (http://www.microsoft.com/technet/sysinternals/
utilities/psgetsid.mspx) available somewhere on your network. I've
used our netlogon share for ease of scripting. What this script does
is get the user's SID and then create a reg file on the local PC which
it then populates with the required information - I've put the bits
you'll need to change in angle brackets and upper case:

<start batch file>


for /f "tokens=*" %%i in ('<PATH TO PSGETSID>psgetsid -accepteula
%username% ^|findstr /C:"-"') do set mysid=%%i

echo Windows Registry Editor Version 5.00 ><LOCALPCPATH>
\addressbooks.reg

echo.>><LOCALPCPATH>\addressbooks.reg

echo [HKEY_USERS\%mysid%\Software\Microsoft\Windows NT\CurrentVersion
\Windows Messaging Subsystem\Profiles\<PROFILE NAME>
\9207f3e0a3b11019908b08002b2a56c2]>><LOCALPCPATH>\addressbooks.reg


echo.>><LOCALPCPATH>\addressbooks.reg

regedit /s <LOCALPCPATH>\addressbooks.reg

<end batch file>

Sorry this isn't very readable, but there aren't any formatting
options on here! Colour would help!

All you now need to do is make your users run this script at login.

I can't take credit for the clever batch file commands that crop out
the SID information, as I found that on another website. Like I said,
this is how we're doing it and it seems to work. It does take some
messing with though.

Hope this helps and good luck!

Luke.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top