Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SET WINVER=0
- for /f "tokens=3" %%A IN ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "DisplayVersion" /reg:64') DO (
- IF NOT "%%A"=="" SET "WINVER=%%A"
- )
- IF "%WINVER%"=="0" (
- for /f "tokens=3" %%A IN ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "ReleaseID" /reg:64') DO (
- IF NOT "%%A"=="" SET "WINVER=%%A"
- )
- )
- IF EXIST "c:\Windows.old\Users\Default\AppData\Local\Microsoft\Windows\usrClass.dat" (
- IF EXIST "c:\Windows.old\Users\Default\NTUSER.dat" (
- IF NOT EXIST "c:\Users\Default\AppData\Local\Microsoft\Windows\usrClass.dat" (
- IF NOT EXIST "c:\windows\temp\NTUSER_%WINVER%.dat.bak" copy /y "c:\users\default\ntuser.dat" "c:\windows\temp\NTUSER_%WINVER%.dat.bak"
- IF EXIST "c:\windows\temp\NTUSER_%WINVER%.dat.bak" (
- attrib -h "c:\Windows.old\Users\Default\AppData\Local\Microsoft\Windows\usrClass.dat"
- copy "c:\Windows.old\Users\Default\AppData\Local\Microsoft\Windows\usrClass.dat" "c:\Users\Default\AppData\Local\Microsoft\Windows\usrClass.dat"
- attrib +h "c:\Windows.old\Users\Default\AppData\Local\Microsoft\Windows\usrClass.dat"
- attrib +h "c:\Users\Default\AppData\Local\Microsoft\Windows\usrClass.dat"
- attrib -h "c:\Windows.old\Users\Default\NTUSER.dat"
- copy /y "c:\Windows.old\Users\Default\NTUSER.dat" "c:\users\default\ntuser.dat"
- )
- )
- )
- )
Add Comment
Please, Sign In to add comment