outlook2007 用户设置备份,微软不肯做,那就咱们自己来!

自从office 2007一出来,我就认定这是个很不错的东西。可惜,微软的产品部不知道是不是脑抽痉了,居然去掉了2003种最受欢迎的用户设置备份向导,而且连替代方案都没有给出(ps:vista的用户设置备份向导适合两地办公的人士么?如果其中一台电脑是xp或者2k呢?这个答案不解决问题!),真是最大的败笔。严重认为office 2007产品开发部缺乏用户体验经历。

既然微软直到sp2都不愿意加上这个功能,那就只能自己做了。(windows 2000不加msconfig的倔强表现重现)

本文主要讲述outlook的同步方法,由于word/excle/ppt/porject等的个人设置虽然重要,但不足以尴尬到无法使用的地步。

经过跟踪分析,outlook的核心设置集中在以下几个部分:

注册表部分:

本地邮件帐号:

[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles]

文件部分:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
%APPDATA%\Microsoft\AddIns

%APPDATA%\Microsoft\Office

%APPDATA%\Microsoft\Proof

%APPDATA%\Microsoft\Templates

%APPDATA%\Microsoft\UProof

%APPDATA%\Microsoft\Proof

%APPDATA%\Microsoft\Outlook

%USERPROFILE%\Local Settings\Application Data\Microsoft\office

%USERPROFILE%\Local Settings\Application Data\Microsoft\outlook

有了这些数据,就方便做事情了。

用batch脚本即可解决:

@echo off

::::::::::::::::::::::::::::::::::::::::::::::::::::::

::backup.cmd

:: AlexBlair 2009/07

::::::::::::::::::::::::::::::::::::::::::::::::::::::

::初始化

set export=reg.exe export
 set import=reg.exe import

set xcp=xcopy /v /c /g /h /r /k /y

set path_cu_ms_app=%APPDATA%\Microsoft
 set path_cu_ms_localapp=%USERPROFILE%\Local Settings\Application Data\Microsoft
 set AlexBlair_now_function=

goto meun

::=====================================

::定义函数

:backup_path_cu_ms_app

%xcp% "%path_cu_ms_app%\%*\*.*" "%cd%\user\Application Data\Microsoft\%*\"
 goto :eof

:backup_path_cu_ms_localapp

%xcp% "%path_cu_ms_localapp%\%*\*.*" "%cd%\user\Local Settings\Application Data\%*\"
 goto :eof

:restore_path_cu_ms_app

%xcp% "%cd%\user\Application Data\Microsoft\%*\*.*" "%path_cu_ms_app%\%*\"
 goto :eof

:restore_path_cu_ms_localapp

%xcp% "%cd%\user\Local Settings\Application Data\%*\*.*" "%path_cu_ms_app%\%*\"
 goto :eof

::=====================================

::构建菜单
 :meun
 cls
 echo.
 echo ==========================
 echo outlook 2007 设置迁移向导
 echo ==========================
 echo [B]ackup
 echo [R]estore
 echo [C]lean Uesr Setting
 echo Clean [M]ail Setting
 echo [E]xit
 echo ==========================
 set /p choose_function= 请选择:

IF "%choose_function%"=="B" GOTO BACKUP
 IF "%choose_function%"=="R" GOTO Restore
 IF "%choose_function%"=="C" GOTO Clean_User_Setting
 IF "%choose_function%"=="M" GOTO Clean_Mail_Setting
 IF "%choose_function%"=="E" GOTO END

GOTO meun

::=====================================

::备份注册表
 :BACKUP

%export% "HKEY_LOCAL_MACHINE\software\microsoft\Office\Outlook\Outlook 10 Accounts" "%cd%\hklm_ms_of_outlook.reg"

%export% "HKEY_LOCAL_MACHINE\software\microsoft\Office\12.0\Outlook" "%cd%\hklm_ms_of_12_outlook.reg"

%export% "HKEY_CURRENT_USER\software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles" "%cd%\hkcu_ms_nt_wms_profiles.reg"

set AlexBlair_now_function=backup

goto files_move
 ::=====================================

::恢复注册表
 :Restore

%import% "%cd%\hklm_ms_of_outlook.reg"
 %import% "%cd%\hklm_ms_of_12_outlook.reg"
 %import% "%cd%\hkcu_ms_nt_wms_profiles.reg"

set AlexBlair_now_function=restore

goto files_move
 ::=====================================

::文件操作
 :files_move

call :%AlexBlair_now_function%_path_cu_ms_app AddIns
 call :%AlexBlair_now_function%_path_cu_ms_app Office
 call :%AlexBlair_now_function%_path_cu_ms_app Proof
 call :%AlexBlair_now_function%_path_cu_ms_app Templates
 call :%AlexBlair_now_function%_path_cu_ms_app UProof
 call :%AlexBlair_now_function%_path_cu_ms_app Outlook
 call :%AlexBlair_now_function%_path_cu_ms_app Stationery
 call :%AlexBlair_now_function%_path_cu_ms_app Signatures
 call :%AlexBlair_now_function%_path_cu_ms_app CryptnetUrlCache

call :%AlexBlair_now_function%_path_cu_ms_localapp Office
 call :%AlexBlair_now_function%_path_cu_ms_localapp Outlook

goto END
 ::=====================================

:Clean_User_Setting
 goto END

:Clean_Mail_Setting
 goto END

:END
 pause

Related posts

发表评论