Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I need to recreate a load of users' mail profiles in Outlook 2010. (It's a long story!)

To try and reduce "user error" I want to script this, so that it removes the user's mail profile, and recreates a replacement.

Is this possible? I've seen the Customer Maintenance Wizard for Outlook 2003, but can't find an equivalent for 2010.

share|improve this question

3 Answers 3

up vote 4 down vote accepted

Outlook 2010 will use auto configuration if you're able to set up the appropriate DNS records. This doesn't completely automate the process, but it will reduce the process to maybe 2-3 steps and eliminate 90% of the configuration work they have to do. All they (in theory) would need to know is their Name, email address, and password.

share|improve this answer
    
Cool - this could work. Found the following to assist me in removing the existing profile: social.technet.microsoft.com/Forums/en-US/outlook/thread/… - once removed I guess it should autocreate again –  Ben Oct 6 '11 at 20:17
    
This would only work if it were Exchange 2007/2010, which it is not. –  Cheekaleak Oct 6 '11 at 20:37
    
@Cheekaleak You are correct, I thought this worked with Exchange 2003 as well, but I guess not. =( –  Coding Gorilla Oct 6 '11 at 20:40
    
Actually this worked with Exch 2003. Was getting error 0x80070057, but applying a hotfix (kb2281463) sorted this, and autoconfigure worked –  Ben Oct 6 '11 at 21:10
    
Awesome! That's good to know. –  Coding Gorilla Oct 6 '11 at 21:11

I'm assumming a single machine here with an Outlook client that does not involve Exchange.

When I upgraded my home machine from XP / Office 2003 --> Win 7 / Office 2010, I unfortunately noticed that many of the outlook settings and configurations were not contained in the PST file. I extracted this information from the user registry used in XP and imported them into the Win 7 registry. My settings basically came back.

My specific concern centered because I use my outlook client to access many different mailboxes on different machines. But this did the trick and I did not have to go through the effort of manually adding (much less remembering what I had done before).

In your case, find the specific area in the users' registry, save it, do the update.

BTW, I recently upgraded inplace from 2003 ---> 2010 at work and all my settings survived and were properly converted.

share|improve this answer

I have this script as a favorite, so people can do this themselves whenever they run into an issue with their outlook profile.

  • It verifies if the user wants to run the script.
  • Closes Outlook.
  • Clears configured profiles in the user's registry.
  • Creates new profile (*you can edit the new profile name with %username% if you'd like.)
  • Opens Outlook with new profile for the user.

Script:

'
' Use this script when user's emails get stuck in Outbox
' l0c0b0x/jb put this one together 9/13/2012
' Change log
' 1.0 initial release
' 1.1 Added registry string to specify a default profile on the account
' -----------------------------------------------------------

' Ask user if they wish to continue with re-creation of their ouotlook profile
intAnswer = _
    Msgbox("This script will remove and recreate your outlook profile on this computer.  Would you like to continue?", _
        vbYesNo, "Reset Outlook Profile")

If intAnswer = vbYes Then

Else
    WScript.Quit
End If

' Close all instances of Outlook
Set objShell = CreateObject("WScript.Shell") 
Set objWmg = GetObject("winmgmts:") 
strWndprs = "select * from Win32_Process where name='outlook.exe'" 
Set objQResult = objWmg.Execquery(strWndprs) 
For Each objProcess In objQResult
    intReturn = objProcess.Terminate(1) 
Next

' Remove registry keys for Outlook Profile
On Error Resume Next
const HKEY_CURRENT_USER = &H80000001
strComputer = "."

Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_ 
strComputer & "\root\default:StdRegProv")

strKeyPath = "Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles"
DeleteSubkeys HKEY_CURRENT_USER, strKeyPath

Sub DeleteSubkeys(reghive, KeyPath) 
    Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_ 
strComputer & "\root\default:StdRegProv")
    objReg.EnumKey reghive, KeyPath, arrrSubkeys 

    If IsArray(arrrSubkeys) Then 
        For Each strrSubkey In arrrSubkeys 
            DeleteSubkeys reghive, KeyPath & "\" & strrSubkey 
        Next 
    End If 

    objReg.DeleteKey reghive, KeyPath 

End Sub
' Add registry key for new profile
strKeyPath = "Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\newprofile"
oReg.CreateKey HKEY_CURRENT_USER,strKeyPath

' Add registry string to specify default profile
strKeyPath = "Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles"
strValueName = "DefaultProfile"
strValue = "newprofile"
oReg.SetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,strValue

' Launch Outlook
objShell.Run "outlook.exe"
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.