2 replies
by loai_kelani Accepted solution
by Former member Accepted solution
Setup that would auto configure outlook when a new user logs in for the first time.
Dim objNetwork, strUserName, WshShell, lServer, strDirectory, objFSO
Dim objShell, objOutlook
Dim sOutlookVersion
' Create Outlook object and Shell object
set objOutlook = CreateObject("Outlook.Application")
set objShell = CreateObject("WScript.Shell")
'Get user's name
Set objNetwork = WScript.CreateObject("WScript.Network")
strUserName = objNetwork.UserName
'Get logon server
Set WshShell = WScript.CreateObject("WScript.Shell")
lserver= WshShell.ExpandEnvironmentStrings("%logonserver%")
'See if the user needs Outlook configured
strDirectory = "C:\Documents and Settings\" & strusername & "\Application Data\Microsoft\Outlook"
' Create the various objects
Set objFSO = CreateObject("Scripting.FileSystemObject")
'See if outlook is installed. If not exit.
If Not objFSO.FolderExists("C:\Program Files\Microsoft Office\Office11") Then
wscript.quit
End If
' Determine outlook version
if objOutlook.Version >= "11.0" And objOutlook.version <= "11.1" Then
sOutlookVersion = "11"
End If
if objOutlook.Version >= "10.0" And objOutlook.version <= "10.1" Then
sOutlookVersion = "10"
End If
if objOutlook.Version >= "9.0" And objOutlook.version <= "9.1" Then
wscript.quit
End If
if objOutlook.Version >= "8.0" And objOutlook.version <= "8.1" Then
wscript.quit
End If
' Import PRF
If Not objFSO.FolderExists(strDirectory) Then
Set oShell = CreateObject("WScript.Shell")
oShell.Run "regedit /s \\mercy\shares\it_tools\office\office11\outlookconfig.reg",1,False
End If
The script detects to see if outlook is installed. If it is it imports a registry file that moddifies the first run registry entry for Outlook and tells outlook which prf file to use. Here is the registry file.
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Setup]
"First-Run"=hex:00
"ImportPRF"="\\\\mercy\\shares\\it_tools\\office\\office11\\MMCOutlook.PRF"
The PRF file can be created manually, however I would recoment using the wizard in the Outlook 2003 resource kit.
Please post back if you have any more problems or questions.
If this information is useful, please mark as helpful. Thanks.
This discussion is closed to new replies.
Trending Software posts
Sort by Trending