Can someone please help, thanks.
Code: Select all
:: Version 3 includes Word and Excel MRU Documments and the Templates folder backup and restoration.
@echo on
cd \
:: Configure Wallpaper
@ECHO OFF
:choice
set /P c=Are you migrating data "from" a Windows 7 computer[Y/N]?
if /I "%c%" EQU "Y" goto :7
if /I "%c%" EQU "N" goto :XP
goto :choice
:XP
xcopy "%cd%\%username%\wallpaper\wallpaper1.bmp" "%userprofile%\AppData\Roaming\Microsoft\Windows\Themes\" /E /Y
reg add "HKCU\Control Panel\Desktop" /v Wallpaper /f /t REG_SZ /d %userprofile%\AppData\Roaming\Microsoft\Windows\Themes\wallpaper1.bmp
RunDll32.exe USER32.DLL,UpdatePerUserSystemParameters ,1 ,True
goto :Continue
:7
xcopy "%cd%\%username%\background\*.*" "%userprofile%\AppData\Roaming\Microsoft\Windows\Themes\" /E /Y
regedit.exe /s "%cd%\%username%\background.reg"
RunDll32.exe USER32.DLL,UpdatePerUserSystemParameters ,1 ,True
:Continue
xcopy "%cd%\%username%\Desktop\*.*" "%userprofile%\Desktop\" /E /Y
xcopy "%cd%\%username%\Favorites\*.*" "%userprofile%\Favorites\" /E /Y
:: Windows 7
xcopy "%cd%\%username%\My Documents\*.*" "%userprofile%\Documents\" /E /Y
xcopy "%cd%\%username%\My Pictures\*.*" "%userprofile%\Pictures\" /E /Y
xcopy "%cd%\%username%\My Music\*.*" "%userprofile%\Music\" /E /Y
xcopy "%cd%\%username%\My Videos\*.*" "%userprofile%\Videos\" /E /Y
xcopy "%cd%\%username%\UProof" "%userprofile%\AppData\Roaming\Microsoft\UProof\" /E /Y
xcopy "%cd%\%username%\Signatures" "%userprofile%\AppData\Roaming\Microsoft\Signatures\" /E /Y
xcopy "%cd%\%username%\Templates" "%userprofile%\AppData\Roaming\Microsoft\Templates\" /E /Y
xcopy "%cd%\%username%\*.nk2" "%userprofile%\AppData\Roaming\Microsoft\Outlook\" /Y
:: GC C: Drive Directories
xcopy "%cd%\%username%\exchange\*.*" "c:\exchange\" /E /Y
xcopy "%cd%\%username%\123data\*.*" "C:\123data\" /E /Y
xcopy "%cd%\%username%\exceldata\*.*" "C:\exceldata\" /E /Y
xcopy "%cd%\%username%\ppdata\*.*" "C:\ppdata\" /E /Y
xcopy "%cd%\%username%\worddata\*.*" "C:\worddata\" /E /Y
xcopy "%cd%\%username%\wpdata\*.*" "C:\wpdata\" /E /Y
xcopy "%cd%\%username%\dbdata\*.*" "C:\dbdata\" /E /Y
:: Restore Drivemappings
regedit.exe /s "%cd%\%username%\Drivemappings.reg"
RunDll32.exe USER32.DLL,UpdatePerUserSystemParameters ,1 ,True
:: Restore IE Homepage
regedit.exe /s "%cd%\%username%\homepage.reg"
:: Restore Word & Excel MRU document history
regedit.exe /s "%cd%\%username%\word2007MRU.reg"
regedit.exe /s "%cd%\%username%\word2010MRU.reg"
regedit.exe /s "%cd%\%username%\excel2007MRU.reg"
regedit.exe /s "%cd%\%username%\excel2010MRU.reg"
:: Gathers System Info and Patches and places file in the backup folder
@echo off
systeminfo >"%cd%\%username%\%Computername%SysInfo.txt"
wmic systemenclosure get serialnumber >>"%cd%\%username%\%Computername%SysInfo.txt"
ipconfig /all >>"%cd%\%username%\%Computername%SysInfo.txt"
wmic qfe get Hotfixid >"%cd%\%username%\%Computername%MSPatches.txt"
START CMD /C "ECHO Restore now complete. It is recommended that you verify your data was restored successfully. Please watch for customized folder names on C:\ for this batch only copies standard GC folders. You may need to log off and back on for the wallpaper and drive mappings to update. && PAUSE"