重新创buildOutlook 2010邮件configuration文件的脚本

我需要在Outlook 2010中重新创build一组用户的邮件configuration文件(这是一个很长的故事!)

要尝试和减less“用户错误”,我想编写脚本,以便它删除用户的邮件configuration文件,并重新创buildreplace。

这可能吗? 我已经看到了Outlook 2003的客户维护向导,但找不到2010年的等价物。

如果您能够设置适当的DNSlogging,Outlook 2010将使用自动configuration。 这并不能使整个过程自动化,但是这个过程可能会减less2-3个步骤,并且消除90%的configuration工作。 他们(理论上)所需要知道的是他们的姓名,电子邮件地址和密码。

我在这里用一个不涉及Exchange的Outlook客户端来欺骗一台机器。

当我从XP / Office 2003 – > Win 7 / Office 2010升级我的家用机器时,我不幸的注意到许多outlook设置和configuration都没有包含在PST文件中。 我从XP中使用的用户registry中提取这些信息,并将它们导入到Win 7registry中。 我的设置基本上回来了。

我特别关心,因为我使用我的Outlook客户端访问不同机器上的许多不同的邮箱。 但是,这个窍门并没有经过手动添加的工作(更不用说记住我之前完成的工作)。

在你的情况下,find用户的registry中的特定区域,保存它,做更新。

顺便说一句,我最近从2003年—> 2010在工作中升级到现场,我所有的设置幸存下来,并妥善转换。

我有这个脚本作为最喜欢的,所以人们可以自己这样做,只要他们遇到了与他们的前景configuration文件的问题。

  • 它validation用户是否要运行该脚本。
  • closuresOutlook。
  • 清除用户registry中configuration的configuration文件。
  • 创build新的configuration文件(*如果您愿意,可以用%username%编辑新的configuration文件名称。)
  • 打开用户的新configuration文件的Outlook。

脚本:

' ' 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"