Outlook 2010 PRF Import

Hi All

 I have set to following but outlook create many profiles?
BackupProfile=No

Also how do i set Outlook Proxy to NTLM? 

As


  • Edited by AUSSUPPORT Wednesday, April 22, 2015 5:57 AM
April 22nd, 2015 5:56am

HI,

Sorry didn't put much information..

My PRF File look like below

 **************************************************************
; Section 1 - Profile Defaults
; **************************************************************

[General]
Custom=1
ProfileName=ASP
DefaultProfile=Yes
OverwriteProfile=Append
ModifyDefaultProfileIfPresent=true
BackupProfile=False

[Service1]
OverwriteExistingService=No
UniqueService=No
MailboxName=%UserName%
HomeServer=rco.com
DefaultAccount=TRUE

========================================================

VB Script to import

==============================================

'This script determines if a specified mail profile already exists.
'If it doesn't, it will set the path to the prf-file containing
'the mail profile configuration settings.

'Script created by: Robert Sparnaaij
'For more information about this file see;
'http://www.howto-outlook.com/howto/deployprf.htm


'=====BEGIN EDITING=====

'Name of mail profile as in the prf-file
ProfileName = "Outlook"

'Path to the prf-file
ProfilePath = "\\server\share\profile.prf"

'Increase the ProfileVersion whenever you want to reapply the prf-file
ProfileVersion = 1

'======STOP EDITING UNLESS YOU KNOW WHAT YOU ARE DOING=====

const HKEY_CURRENT_USER = &H80000001
const HKEY_LOCAL_MACHINE = &H80000002

strComputer = "."
Set objRegistry = GetObject("winmgmts:\\" & _
    strComputer & "\root\default:StdRegProv")
 
strKeyProfilePath = _ 
	"Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\" _ 
	& ProfileName & "\9375CFF0413111d3B88A00104B2A6676"
strLastChangeVer = "LastChangeVer"
objRegistry.GetBinaryValue _
	HKEY_CURRENT_USER,strKeyProfilePath,strLastChangeVer,strValueLastChangeVer

If ProfileVersion > 1 Then
    strKeyProfileVersionPath = "SOFTWARE\HowTo-Outlook\DeployPRF"
    strProfileVersionName = ProfileName
    objRegistry.GetDWORDValue _
    	HKEY_CURRENT_USER,strKeyProfileVersionPath,strProfileVersionName,strValueProfileVersion

    If IsNull(strValueProfileVersion) OR ProfileVersion > strValueProfileVersion Then
	ReapplyPrf = True
    End If
End If

If IsNull(strValueLastChangeVer) OR ReapplyPrf Then
    'The mail profile doesn't exist yet so we'll set the the ImportPRF key and remove the FirstRun keys

    'Determine path to outlook.exe
    strKeyOutlookAppPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\OUTLOOK.EXE"
    strOutlookPath = "Path"
    objRegistry.GetStringValue _
    	HKEY_LOCAL_MACHINE,strKeyOutlookAppPath,strOutlookPath,strOutlookPathValue

    'Verify that the outlook.exe and the configured prf-file exist
    Set objFSO = CreateObject("Scripting.FileSystemObject") 
    If objFSO.FileExists(strOutlookPathValue & "outlook.exe") AND objFSO.FileExists(ProfilePath) Then

	'Determine version of Outlook
	strOutlookVersionNumber = objFSO.GetFileVersion(strOutlookPathValue & "outlook.exe")
	strOutlookVersion = Left(strOutlookVersionNumber, inStr(strOutlookVersionNumber, ".0") + 1)

	'Create the Setup key, set the ImportPRF value and delete the First-Run values.
	strKeyOutlookSetupPath = "SOFTWARE\Microsoft\Office\" & strOutlookVersion & "\Outlook\Setup"

	strImportPRFValueName = "ImportPRF"
	strImportPRFValue = ProfilePath
	objRegistry.CreateKey HKEY_CURRENT_USER,strKeyOutlookSetupPath
	objRegistry.SetStringValue HKEY_CURRENT_USER,_
 	    strKeyOutlookSetupPath,strImportPRFValueName,strImportPRFValue

	strFirstRunValueName = "FirstRun"
	objRegistry.DeleteValue HKEY_CURRENT_USER,_
 	    strKeyOutlookSetupPath,strFirstRunValueName

	strFirstRun2ValueName = "First-Run"
	objRegistry.DeleteValue HKEY_CURRENT_USER,_
 	    strKeyOutlookSetupPath,strFirstRun2ValueName

	'Save the applied ProfileVersion if larger than 1.
	If ProfileVersion > 1 Then
	    objRegistry.CreateKey HKEY_CURRENT_USER,strKeyProfileVersionPath
	    objRegistry.SetDWORDValue HKEY_CURRENT_USER,_
		strKeyProfileVersionPath,strProfileVersionName,ProfileVersion
	End If

    Else 
        Wscript.Echo "Crucial file in script could not be found." &vbNewLine & _
        "Please contact your system administrator." 
    End If

Else
    'The mail profile already exists so there is no need to launch Outlook with the profile switch.
    'Of course you are free to do something else here with the knowledge that the mail profile exists.
End If

'Cleaup
Set objRegistry = Nothing
Set objFSO = Nothing

Free Windows Admin Tool Kit Click here and download it now
April 30th, 2015 1:11am

Hi All,

  How do i check this script run before?

As 

May 4th, 2015 12:27am

Hi All,

  How do i check this above script run before?

i just create the bat file but this is working in local pc but put it to GPO user strtup but didn't import?

@echo off
set Logfile=%AppData%\outlook.log
if not exist "%Logfile%" (
echo Outlook Profile installed on %date% at %time% >> %LogFile%

outlook.exe /importprf outlook.exe /importprf \\bpo.com\netlogon\PAC.prf

)

As 


Free Windows Admin Tool Kit Click here and download it now
May 4th, 2015 4:25am

Hi All,

  How do i check this above script run before?

i just create the bat file but this is working in local pc but put it to GPO user strtup but didn't import?

@echo off
set Logfile=%AppData%\outlook.log
if not exist "%Logfile%" (
echo Outlook Profile installed on %date% at %time% >> %LogFile%

outlook.exe /importprf outlook.exe /importprf \\bpo.com\netlogon\PAC.prf

)

As 


  • Edited by AUSSUPPORT Monday, May 04, 2015 7:37 AM
May 4th, 2015 4:25am

Hi,

Try to create the bat file to add outlook accounts but bat file not applying the prf?

@echo off
set Logfile=%AppData%\outlook1.log
if not exist "%Logfile%" (
 OUTLOOK.EXE /importprf \\bto.com\netlogon\PAC.prf
echo Outlook Profile installed on %date% at %time% >> %LogFile%

)

Free Windows Admin Tool Kit Click here and download it now
May 4th, 2015 9:01am

Hi,

Try to create the bat file to add outlook accounts but bat file not applying the prf?

@echo off
set Logfile=%AppData%\outlook1.log
if not exist "%Logfile%" (
 OUTLOOK.EXE /importprf \\bto.com\netlogon\PAC.prf
echo Outlook Profile installed on %date% at %time% >> %LogFile%

)

May 4th, 2015 1:00pm

Hi,

I'm personally not familiar with script and since you've already verified that "this is working in local pc but put it to GPO user strtup but didn't import", I would suggest you try the dedicated Group Policy forum, where you can get more experienced responses:

https://social.technet.microsoft.com/Forums/windowsserver/en-US/home?forum=winserverGP

Thanks for your understanding.

Regards,

Ethan Hua

Forum Support

Free Windows Admin Tool Kit Click here and download it now
May 5th, 2015 3:22am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics