Monday, January 26, 2009

Using a GPO to configure RPC over HTTPS Setting Continued

While there is an Outlook administrative template for Office 2007 that can be tweaked in order to set the RPC over HTTPS setting, these same settings won't have any effect on Outlook 2003 users even after changing the registry locations to reflect Outlook 2003.

As a workaround, you can use the following script and a .prf file to make the changes to Outlook's RPC over HTTPS settings (or any other settings for that matter)

First I check to see if the file OUTPRF.SET exist in the Outlook application directory. If it doesn't then I flag Outlook to import the .prf file from the specified location before finally creating the OUTPRF.SET file in the application directory so that it won't import the settings again next time Outlook is opened.

'Script to set RPC over HTTPs setting for Outlook 2003 users
'By Derek W. Aude

Dim wShell, objFSO, strFolder, objFile
Set wShell = CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
strFolder = wShell.ExpandEnvironmentStrings("%AppData%\Microsoft\Outlook")

If Not objFSO.FileExists(strFolder & "\OUTPRF.SET") Then
wShell.RegWrite "HKCU\Software\Microsoft\Office\11.0\Outlook\Setup\First-Run", CLng(0), "REG_BINARY"

wShell.RegWrite "HKCU\Software\Microsoft\Office\11.0\Outlook\Setup\ImportPrf","\\Your\Network\\Location", "REG_SZ"

wShell.Run "%comspec% /c" & chr(34) & "Completed Successfully >" & chr(34) & "%appdata%\Microsoft\OUTLOOK\OUTPRF.SET" & chr(34),0,False

End If

Save this as a .vbs file on a network share and run it as a call it from a GPO as a log on script.

No comments: