If you want to deploy a PRF file to all your users you can use this sample .vbs code.
I took some time and I wrote this sample code which will help you to deploy a PRF to all your users, but before doing this please read the statement below:
“MICROSOFT MAKES NO WARRANTIES ABOUT THE SUITABILITY, RELIABILITY OR ACCURACY OF THE SAMPLE APPLICATION THAT HAS BEEN SENT TO YOU,
PLEASE USE IT ON YOUR OWN RISK AND JUST AS A SAMPLE APPLICATION THAT ILUSTRATES HOW SUCH A FUNCTIONALITY CAN BE IMPLEMETED.
This sample is not supported under any Microsoft standard support program or service. The sample code is provided AS IS without warranty of any kind. Microsoft further disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code and documentation remains with you. In no event shall Microsoft, its authors, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code or documentation.”
Please test this before you apply this globally in your organization.
This VBS sample code was written for all Outlook versions:
Dim FSO, FSO2
Dim objFile, FileName
‘if you want to run only for newly profiles and you don’t want to update the old ones, you can use the commented lines below:
‘ Set oShell = Wscript.CreateObject(“Wscript.Shell”)
‘ On Error Resume Next
‘ DefProfileKey = oShell.RegRead(“HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\DefaultProfile”)
‘ If Err.Number <> 0 Then
‘ if (DefProfileKey = ””) Then
Set oShell = Wscript.CreateObject(“Wscript.Shell”)
UserName = oShell.ExpandEnvironmentStrings(“%USERNAME%”)
checkFile = “C:\Documents and Settings\” & UserName & “\prf.txt”
strSource = “\\zonedcc1\Alex\outlook.prf” ‘path to the prf file, this should be changed with your location where the PRF is saved.
strTarget = “C:\Documents and Settings\” & UserName & “\” ‘path to the prf file
Set FSO = CreateObject(“Scripting.FileSystemObject”)
Set FSO2 = CreateObject(“Scripting.FileSystemObject”)
on error resume next
If (FSO.FileExists(strSource) = True) Then
FSO.CopyFile strSource, strTarget, True
if not (FSO2.FileExists(checkFile) = True) Then
oshell.RegDelete “HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook\Setup\First-Run” ‘14.0 is for Outlook 2010
oshell.RegDelete “HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Outlook\Setup\First-Run” ‘12.0 is for Outlook 2007
oshell.RegDelete “HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Setup\First-Run” ‘11.0 is for Outlook 2003
oshell.RegWrite “HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook\Setup\ImportPRF”, strTarget & “Outlook.prf”, “REG_SZ”
oshell.RegWrite “HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Outlook\Setup\ImportPRF”, strTarget & “Outlook.prf”, “REG_SZ”
oshell.RegWrite “HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Setup\ImportPRF”, strTarget & “Outlook.prf”, “REG_SZ”
Set objFile = FSO2.CreateTextFile(checkFile)
Set FSO = Nothing
Set FSO2 = Nothing
Set oShell = Nothing
Apply an Outlook Profile (PRF) File to configure Outlook profiles:
Customize Outlook profiles by using an Outlook Profile (PRF) file:
Office Customization Tool in Office 2010:
I hope this helps you, and I’m glad to receive any comments or suggestions.