Get Binary Value _ HKEY_CURRENT_USER,str Key Profile Path,str Last Change Ver,str Value Last Change Ver 'Check if the prf-file needs to be reapplied If Profile Version 1 Then str Key Profile Version Path = "SOFTWARE\How To-Outlook\Deploy PRF" str Profile Version Name = Profile Name obj Registry.
Get DWORDValue _ HKEY_CURRENT_USER,str Key Profile Version Path,str Profile Version Name,str Value Profile Version If Is Null(str Value Profile Version) OR Profile Version str Value Profile Version Then Reapply Prf = True End If End If 'Apply the prf-file if needed If Is Null(str Value Last Change Ver) OR Reapply Prf Then 'The mail profile doesn't exist yet so we'll set the the Import PRF key and remove the First Run keys 'Verify that the configured prf-file exist Set obj FSO = Create Object("Scripting. File Exists(Profile Path) Then 'Create the Setup key, set the Import PRF value and delete the First-Run values.
Key: values have been set, updating the mail profile without ending up applying it each time the user logs on is a bit more complicated.
When an end-user starts Outlook for the first time in a managed environment, he or she usually expects that Outlook is fully configured already and simply opens to the Inbox.
Being a good administrator, you obviously want to create this experience for your users as well.
The command to use in your startup script would be similar to; Outlook 2003If you are still using Outlook 2003, then you can use the Office Resource Kit (ORK) to create a Custom Maintenance Wizard File (cmw-file).
To apply this to your users, deploy the file to the Office directory of the user’s machine and execute it with a the location of the cmw-file as the parameter in a GPO startup script.
This issue has been first fixed in hotfix KB2584053 and is also included in later updates.
If Outlook 2007, Outlook 2010 or Outlook 2013 is already installed on the client computers, you can create a new msp-file via the OCT which only holds mail profile settings and nothing else. This deployment can be done via Microsoft System Center Configuration Manager or via a different deployment application within your organization.The OCT or ORK also allows you to export the Outlook mail profile as a prf-file.This prf-file can then be distributed to your users via a logon script.' If it doesn't, it will set the path to the prf-file containing ' the mail profile configuration settings.' ' author : Robert Sparnaaij ' version: 2.0 ' website: '=====BEGIN EDITING===== 'Name of mail profile as in the prf-file Profile Name = "Outlook" 'Path to the prf-file Profile Path = "\server\share\profile.prf" 'Increase the Profile Version whenever you want to reapply the prf-file Profile Version = 1 '======STOP EDITING UNLESS YOU KNOW WHAT YOU ARE DOING===== const HKEY_CURRENT_USER = &H80000001 const HKEY_LOCAL_MACHINE = &H80000002 str Computer = "." Set obj Registry = Get Object("winmgmts:\" & _ str Computer & "\root\default: Std Reg Prov") 'Determine path to str Key Outlook App Path = "SOFTWARE\Microsoft\Windows\Current Version\App Paths\OUTLOOK. Get String Value _ HKEY_LOCAL_MACHINE,str Key Outlook App Path,str Outlook Path,str Outlook Path Value 'Verify that the exist and get version information Set obj FSO = Create Object("Scripting. File Exists(str Outlook Path Value & "outlook.exe") Then str Outlook Version Number = obj FSO.Directly deploying Outlook mail profile settings when deploying Office is the best way to go.