
md "bacup\Documents and Settings\%profile%\Local Settings\Application Data\Microsoft\Windows"

attrib -H -S "Documents and Settings\%profile%\NTUSER.DAT"
attrib -H -S "Documents and Settings\%profile%\ntuser.dat.LOG"
attrib -H -S "Documents and Settings\%profile%\Local Settings\Application Data\Microsoft\Windows\UsrClass.dat"
attrib -H -S "Documents and Settings\%profile%\Local Settings\Application Data\Microsoft\Windows\UsrClass.dat.LOG"

copy /y "Documents and Settings\%profile%\NTUSER.DAT" "bacup\Documents and Settings\%profile%\NTUSER.DAT"
copy /y "Documents and Settings\%profile%\ntuser.dat.LOG" "bacup\Documents and Settings\%profile%\ntuser.dat.LOG"
copy /y "Documents and Settings\%profile%\Local Settings\Application Data\Microsoft\Windows\UsrClass.dat" "bacup\Documents and Settings\%profile%\Local Settings\Application Data\Microsoft\Windows\UsrClass.dat"
copy /y "Documents and Settings\%profile%\Local Settings\Application Data\Microsoft\Windows\UsrClass.dat.LOG" "bacup\Documents and Settings\%profile%\Local Settings\Application Data\Microsoft\Windows\UsrClass.dat.LOG"

cd bacup
c:\sysprep\7zr.exe  a -mx=5 -r0 tmprest.7z .

COPY /b c:\sysprep\tmprest.sfx + tmprest.7z c:\tmprest.exe

cd ..
rd /s /q bacup 


pause