今天重装系统啦,好多文件要备份,然后装完系统再恢复回来。
觉得麻烦,于是baidu一下,发现可以用inf+bat来简单的实现这个功能
。
[Version]
Signature="$Windows NT$"
[DefaultInstall]
AddReg=Shell Folders_AddReg
[Shell Folders_AddReg]
HKCU,"%User_Shell_Folders%","Favorites",0x00020000,"D:\Personal\Favorites"
HKCU,"%User_Shell_Folders%","Personal",0x00020000,"D:\Personal\My Documents"
hkcu,"%User_Shell_Folders%","Cookies",0x00020000,"D:\Personal\Cookies"
HKCU,"%User_Shell_Folders%","Desktop",0x00020000,"D:\Personal\Desktop"
HKCU,"%User_Shell_Folders%","My Pictures",0x00020000,"D:\Personal\My Documents\My Pictures"
[Strings]
User_Shell_Folders="Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"
下面是bat文件
set NEWDEST=D:\Personal
xcopy "%USERPROFILE%\Favorites" "%NEWDEST%\Favorites" /I /S /E
xcopy "%USERPROFILE%\Cookies" "%NEWDEST%\Cookies" /I /S /E
xcopy "%USERPROFILE%\My Documents" "%NEWDEST%\My Documents" /I /S /E
xcopy "%USERPROFILE%\桌面" "%NEWDEST%\Desktop" /I /S /E
posted on 2006-09-24 19:19
shaker(太子) 阅读(585)
评论(0) 编辑 收藏 引用 所属分类:
Utility