|
由于直接复制时无法被复制的基本都是注册表文件,于是我想能否写个批处理来复制文件并导出注册表
xcopy /e /h /r /y /i /d /c "c:\" "%~dp0save\"
reg save "HKLM\SAM" "%~dp0save\windows\system32\config\sam"
reg save "HKLM\SECURITY" "%~dp0save\windows\system32\config\Security"
reg save "HKLM\SOFTWARE" "%~dp0save\windows\system32\config\Software"
reg save "HKLM\SYSTEM" "%~dp0save\windows\system32\config\System"
reg save "HKU\.DEFAULT" "%~dp0save\windows\system32\config\DEFAULT"
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList">pfs.txt
for /f "eol=[ tokens=7 delims=\" %%a in (pfs.txt) do (
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\%%a" /v "ProfileImagePath" >pfd.txt
for /f "eol=H tokens=2,* delims=\" %%i in (pfd.txt) do (
reg save "HKEY_USERS\%%a" "%~dp0save\%%i\%%j\NTUSER.DAT"
reg save "HKEY_USERS\%%a_Classes" "%~dp0save\%%i\%%j\Local Settings\Application Data\Microsoft\Windows\UsrClass.dat"
)
)
pause
求帮看有没有什么没考虑到的 |
|