You gus should download a copy of the ORK (Office Resource Kit. You can push down entirely configured versions of Outlook and your user will just get prompted for their initials on first load.
Please refer to my FAQ for details. faq96-4996
I hope you find this post helpful. Please let me know if it was.
'==========================================================================
'
' VBScript Source File -- Created with SAPIEN Technologies PrimalScript 3.1
'
' NAME:
'
' AUTHOR: Sip
' DATE : 8/1/2004
'
' COMMENT: Creates user's Outlook profile. The script creates a PRF directory on the user's home directory then copies %USERNAME%.prf within the PRF directory.
' Must have a source PRF directory and target user's home directory. Create a directory named "PRF" and put it on a share, copy the two .prf files and newprof.exe to this directory.
' Open the .prf files in Notepad and edit New.prf "[ServiceEGS]&[Service1] HomeServer=NAMEOFMAILSERVER" Old.prf "[Service2] HomeServer=NAMEOFMAILSERVER.
' If you have Outlook 2000 clients, copy cpau.exe and Outlook2000Reg.vbs to a share on your server. This will be needed to add registry entries.
' The user's .prf file will be used to create their initial profile and to hold their Outlook settings. With outlook.exe you can export settings to the .prf then import into Outlook.
' Tested on Windows 2000 and XP machines running Outlook 2000 - 2003.
'==========================================================================
'On Error Resume Next
'Initialize variables
Set oNet = WScript.CreateObject("WScript.Network")
Set WSHFileSystem = WScript.CreateObject("Scripting.FileSystemObject")
Set WSHShell = WScript.CreateObject("WScript.Shell")
strUserDomain = oNet.UserDomain
strUserName = oNet.UserName
HomeDrive = "U:\" ' Specify the user's home directory drive.
PRFpath = "\\SERVER\Share01\PRF" ' Specify the path to the .prf template.
UserHome = "\\SERVER\Users\" & strUserName ' Specify the user's home directory.
UserPRF = UserHome & "\PRF\" ' Specify the path where the user's .prf will reside.
NewPRF = "New.prf" ' Name of the Outlook 2003/XP .prf template.
OldPRF = "Old.prf" ' Name of the Outlook 2000 template.
Path = UserPRF & strUserName & ".prf" ' Changes copied .prf file to user's %USERNAME%.
WSHInstall = "\\SERVER\Installs" ' Specify name of directory that holds objects.
AddReg ' Adds registry entries for Outlook 2000.
OutlookProfile ' Creates PRF\%USERNAME% on the user's home directory. Creates Outlook profile.
Sub OutlookProfile()
On Error Resume Next
If Outlookver = "Outlook 2003" Then
arr = WSHShell.RegRead("HKCU\Software\Microsoft\Office\11.0\Outlook\Setup\First-Run")
If arr = True Then
ElseIf Err.Number <> 0 Then
WSHShell.RegWrite "HKCU\Software\Microsoft\Office\11.0\Outlook\Setup\"
If (WSHFileSystem.FileExists(PRFpath & "\" & NewPRF)) Then
WSHFileSystem.CreateFolder(UserHome & "\PRF")
WSHFileSystem.CopyFile PRFpath & "\" & NewPRF, Path
'WScript.Echo "Downloading Outlook Profile.."
WSHShell.RegWrite "HKCU\Software\Microsoft\Office\11.0\Outlook\Setup\" & "ImportPRF", Path , "REG_SZ"
'WScript.Echo "Setting Outlook Profile.."
End If
End If
'End If
Else
If Outlookver = "Outlook XP" Then
arr = WSHShell.RegRead("HKCU\Software\Microsoft\Office\10.0\Outlook\Setup\First-Run")
If arr = True Then
ElseIf Err.Number <> 0 Then
WSHShell.RegWrite "HKCU\Software\Microsoft\Office\10.0\Outlook\Setup\"
If (WSHFileSystem.FileExists(PRFpath & "\" & NewPRF)) Then
WSHFileSystem.CreateFolder(UserHome & "\PRF")
WSHFileSystem.CopyFile PRFpath & "\" & NewPRF, Path
'WScript.Echo "Downloading Outlook Profile.."
WSHShell.RegWrite "HKCU\Software\Microsoft\Office\10.0\Outlook\Setup\" & "ImportPRF", Path , "REG_SZ"
'WScript.Echo "Setting Outlook Profile.."
End If
End If
'End If
Else
If Outlookver = "Outlook 2000" Then
arr = WSHShell.RegRead("HKCU\Software\Microsoft\Office\9.0\Outlook\Setup\First-Run")
If arr = True Then
ElseIf Err.Number <> 0 Then
If (WSHFileSystem.FileExists(PRFpath & "\" & OldPRF)) Then
WSHFileSystem.CreateFolder(UserHome & "\PRF")
WSHFileSystem.CopyFile PRFpath & "\" & OldPRF, Path
'WScript.Echo "Downloading Outlook Profile.."
WSHShell.Run PRFpath & "\NEWPROF.exe -p " & Path,1,True
'WScript.Echo "Setting Outlook Profile.."
End If
End If
' Else
' If Err.Number = 0 Then
' WScript.Echo "Profile already exists."
End If
End If
End If
End Sub
Function Outlookver()
If DetermineObject <> "" Then
Dim X
Set X = CreateObject(DetermineObject)
If Len(X.version) = 11 Then
Select Case Left(X.version,2)
Case "11"
Outlookver = "Outlook 2003"
Case "10"
Outlookver = "Outlook XP"
End Select
ElseIf Len(X.version) = 10 Then
Select Case Left(X.version,1)
Case "9"
Outlookver = "Outlook 2000"
End Select
Set X = Nothing
Else OutlookVer = "Unknown"
' End If
' End If
End If
End If
End Function
Function DetermineObject()
On Error Resume Next
Dim NEW_OBJ: Set NEW_OBJ = CreateObject("Outlook.Application.11")
Dim OLD_OBJ: Set OLD_OBJ = CreateObject("Outlook.Application")
Dim OLDER_OBJ: Set OLDER_OBJ = CreateObject("Outlook.Application.9")
If IsObject(NEW_OBJ) Then
DetermineObject = "Outlook.Application.11"
ElseIf IsObject(OLD_OBJ) Then
DetermineObject = "Outlook.Application"
ElseIf IsObject(OLDER_OBJ) Then
DetermineObject = "Outlook.Application.9"
Else
DetermineObject = ""
End If
End Function
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.