Automate Outlook Profile Creation Using PRFPATCH

Archived content. No warranty is made as to technical accuracy. Content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

By Rick Varvel, Microsoft Consulting Services, Portland

On This Page

Introduction
Downloading Sample Installation Files
How PRFPATCH Works
Troubleshooting Profile Creation
Conclusion
More Information

Introduction

Adding profiles for new Outlook users can be a time-consuming administrative task, especially when users are involved in the setup process. Currently, tools like PROFGEN allow administrators to control the value entered for the MailboxName, but other variables must still be entered manually, increasing the likelihood of errors.

A new tool, PRFPATCH, provides control over any parameter that can be set within Outlook.prf. Automating all the variables saves administrators considerable time by reducing the risk of error, creating consistent profiles that are personalized for specific users, and eliminating user involvement in set up.

This article provides procedures, attached files, and information on automating Outlook profiles. It complements an earlier article, Customize MS Outlook Installations , which explained how to customize the Outlook client interface and recommended using PROFGEN or FIXPRF to enable a "hands-free" installation, but stopped short of profile modification.

PRFPATCH modifies the profile name, the path to personal folders name, and the path to personal address books by controlling the following parameters:

  • ProfileName

  • MailboxName

  • PathToPersonalFolders

  • PathToPersonalAddressBook

  • Any PRF value containing the string %username%

Note: This article details a number of technical procedures and only knowledgeable personnel should follow the steps outlined. Microsoft recommends thoroughly testing customized installations prior to production use.

Downloading Sample Installation Files

Below is a self-extracting executable file containing three files:

  • prfpatch.exe—the tool

  • utlook.prf—sample file

  • userprof.bat—sample file

Click here to access profile.exe

The sample files (outlook.prf and userprof.bat) are for reference only. Userprof.bat illustrates how to implement this in a production environment. The Outlook.prf sample file has a string called yourServerName, which you should replace with the correct name.

How PRFPATCH Works

PRFPATCH creates profiles for both Outlook 97 and Outlook 98 and runs on either Windows 95 or Windows NT. It works by searching through Outlook.prf for any occurrence of %username% and replaces it with the name of the user currently logged in. Changes are written to Outlook.sav, the original Outlook.prf is deleted, and Outlook.sav is renamed to Outlook.prf.

PRFPATCH supports a single command line parameter. If PRFPATCH is called with any value other than /?, the value being passed in over-rides the user currently logged in. For example, if a technician logs in as ALEXVA and runs PRFPATCH UserX, an Exchange profile will be created for UserX rather than alexva.

Note: OUTLOOK.PRF must be placed in the directory where Windows is located.

To use, modify OUTLOOK.PRF and place the string %%username%% wherever you want to substitute the name of the current user. For example:

ProfileName=%username%

MailboxName=%username%

PathToPersonalAddressBook=x:\\homeserver\\%username%\\%username%.pab

Then run NEWPROF.EXE to create the Outlook user profile.

Type newprof /? for options

Troubleshooting Profile Creation

If a user profile is not created after running NEWPROF or if some of the services are not installed, check the following syntax rules for Outlook.prf:

  1. Services must be contiguous

    ; Section 2 - Services in profile.

    [Service List]

    Service1=Microsoft Outlook Client

    Service2=Microsoft Exchange Server

    Service3=Outlook Address Book

    ;Service4=Personal Address Book

    Service5=Archived Messages

[Service4] PathToPersonalAddressBook="c:\windows%username%.pab" ViewOrder=1 [Service5] PathToPersonalFolders="c:\windows%username%.pst" RememberPassword=TRUE EncryptionType=0x40000000 Password=

For example, the code segment above shows the Services section from Outlook.prf that control which services are created when newprof runs. In the example, Service4=Personal Address Book is commented out using a semi-colon. If newprof is run in this configuration, Services 5 will not be created because newprof will stop processing as soon as it hits the first comment. To correct this situation, move the commented line to the bottom or delete it and then renumber Service5 to Service4. In addition, modify the sections that Service4 (formerly Service5) references.

The modified version, with the original Service4 section commented out and Service5 changed to Service4, should look like this:

**; Section 2 - Services in profile.**

\[Service List\]

Service1=Microsoft Outlook Client

Service2=Microsoft Exchange Server

Service3=Outlook Address Book

Service4=Archived Messages

;Service4=Personal Address Book

<pre IsFakePre="true" xmlns="https://www.w3.org/1999/xhtml">

;[Service4] ;PathToPersonalAddressBook="c:\windows%username%.pab" ;ViewOrder=1 [Service4] PathToPersonalFolders="c:\windows%username%.pst" RememberPassword=TRUE EncryptionType=0x40000000 Password=

  1. Path statements with spaces must be wrapped with quotes. For example, the path statement below will be ignored:

[Service5] PathToPersonalFolders=c:\Progam Files%username%.pst

  1. The modified version below will work:

[Service5] PathToPersonalFolders="c:\Program Files%username%.pst"

Note: If you encounter problems creating profiles, call newprof.exe with the –s –z parameters to display a graphical representation of the profile creation process.

Conclusion

The tools and information described in this article have been used successfully to create Outlook user profiles in a production environment. With a little modification, automating the Outlook user profile creation will help:

  • Reduce installation time

  • Roll out consistent implementations

  • Relieve the burden on users to know what Exchange server to connect to and what their Exchange alias name is

  • Assist in a "hands-free" installation of the Outlook client

In some cases, customers have experienced a 50 percent reduction in time needed to install the Outlook client and fewer end-user calls to Helpdesk as a result of automating the Outlook user profile creation process.

More Information

For related information on Outlook setup, search on the following Microsoft Knowledge Base articles in TechNet:

  • 166778—OL97: Contents of the Profile.doc Readme File

  • 171628—OL97: Stand-Alone Outlook 97 Setup Options

  • 166300—OL97: Outlook Services File Information

  • 165374—OL97: Setup in Batch/Quiet Mode for Outlook

  • 145905—XCLN: NEWPROF.EXE Command Line Options

  • 161487—OFF97: Contents of Relnotes.doc for the NIW

  • 161973—OL97: Troubleshooting Outlook Configuration Problems

  • 182151—OL98: Troubleshooting Outlook Configuration Problems

  • 174291—OL97: Articles Available by Fax or E-Mail: Configuration

These articles are also available on the Microsoft Web site. Just connect to this site https://support.microsoft.com/ to access the Knowledge Base and search on the above Q#s.

We at Microsoft Corporation hope that the information in this work is valuable to you. Your use of the information contained in this work, however, is at your sole risk. All information in this work is provided "as -is", without any warranty, whether express or implied, of its accuracy, completeness, fitness for a particular purpose, title or non-infringement, and none of the information mentioned in the work are supported or guaranteed by Microsoft Corporation. Microsoft Corporation shall not be liable for any damages you may sustain by using this information, whether direct, indirect, special, incidental or consequential, even if it has been advised of the possibility of such damages.

Microsoft TechNet

July 1998
Volume 6, Issue 7