Thursday, 10 January 2008

How-To Create an Outlook Profile Automatically

We need a way of creating users Outlook profiles automatically. They can run this the first time they login, or at any other time to recreate thier profile.

First download the files here.

The files are stored in a shared directory.
We created a directory in SYSVOL so that all users could access them.
The path would be something like \\YourDomainName\SYSVOL\YourDomainName\Scripts\OutlookFirstRun.
They could be stored in a standard shared folder if you prefer, just edit the path in the scripts.

This is an AutoIT script that you need to edit and compile to an .EXE using Auto IT (Freeware).
It can be found at

The outlook icon for compiling OutlookFirstRun.exe.
We used this so that the program looked the same as Outlook.

This is a VB script that writes the users display name to a file.
We write it to F:\Display.txt, as F:\ is the users home directory.
Again, you can change this.

This is a file that contains settings to be imported into outlook.
It sets up the users profile for them.

Functional description:
Instead of launching Outlook.exe, the user launches OutlookFirstRun.exe. You have to arrange for this to happen. We use Ericom to publish this as a terminal server application but you could create an MSI or use the RunOnce registry key. The program could be included in your build Ghost image for example.
OutlookFirstRun.exe calls DisplayName.VBS.
DisplayName.vbs reads the users display name from AD and creates as an Environment Variable %DISPLAYNAME%.
OutlookFirstRun then launches Outlook.exe and imports Outlook.prf.
Outlook.prf must be edited to contain your Exchange server name and any additional changes.
We don’t use cached PSTs for example, as we’re running in a terminal server farm environment.

Feel free to use these files - Distributed under GPL-v3.

No comments:

Post a Comment