' VBScript that will disable outlook profile wizard and create a an outlook profile FOR NEW USERS ONLY
'
Set WSHShell = WScript.CreateObject("WScript.Shell")
Dim fso, WSHShell, WSHNetwork, objDomain, DomainString, UserString, UserObj, Path
'
Set fso = CreateObject("Scripting.FileSystemObject")
Set WSHShell = CreateObject("WScript.Shell")
Set WSHNetwork = CreateObject("WScript.Network")
DomainString = Wshnetwork.UserDomain
UserString = WSHNetwork.UserName
On Error Resume Next
if NOT fso.FileExists("\\fileserv\users\" & UserString & "." & DomainString & "\Application Data\Microsoft\Outlook\Outlook.NK2") then
WshShell.RegDelete "HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Setup\FirstRun"
WshShell.RegDelete "HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Setup\First-Run"
WSHShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Setup\ImportPRF","c:\outlook.prf","REG_SZ"
end if
'
'Clean Up Memory We Used
set fso=nothing
set UserObj = Nothing
set GroupObj = Nothing
set WSHNetwork = Nothing
set DomainString = Nothing
set WSHSHell = Nothing
'Quit the Script
wscript.quit
|