Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :: Created By FreeBooter
- :: www.dost-tech.com
- @Echo Off & Cls
- Echo.
- Call :IsAdmin
- If Not Exist C:\Registry_Backups (md C:\Registry_Backups) Else (Goto :Skip)
- If Not Exist C:\Registry_Backups\RegOld (Md C:\Registry_Backups\RegOld) Else (Goto :Skip)
- :Skip
- if exist C:\Registry_Backups\DEFAULT.OLD move /Y C:\Registry_Backups\DEFAULT.OLD C:\Registry_Backups\RegOld
- if exist C:\Registry_Backups\SAM.OLD move /Y C:\Registry_Backups\SAM.OLD C:\Registry_Backups\RegOld
- if exist C:\Registry_Backups\SECURITY.OLD move /Y C:\Registry_Backups\SECURITY.OLD C:\Registry_Backups\RegOld
- if exist C:\Registry_Backups\SOFTWARE.OLD move /Y C:\Registry_Backups\SOFTWARE.OLD C:\Registry_Backups\RegOld
- if exist C:\Registry_Backups\SYSTEM.OLD move /Y C:\Registry_Backups\SYSTEM.OLD C:\Registry_Backups\RegOld
- if exist C:\Registry_Backups\NTUSER.OLD move /Y C:\Registry_Backups\NTUSER.OLD C:\Registry_Backups\RegOld
- if exist C:\Registry_Backups\sessionstore.OLD move /y C:\Registry_Backups\sessionstore.OLD C:\Registry_Backups\RegOld
- If Exist C:\Registry_Backups\DEFAULT Ren C:\Registry_Backups\DEFAULT DEFAULT.OLD 2>&1 > Nul
- If Exist C:\Registry_Backups\SAM Ren C:\Registry_Backups\SAM SAM.OLD 2>&1 > Nul
- If Exist C:\Registry_Backups\SECURITY Ren C:\Registry_Backups\SECURITY SECURITY.OLD 2>&1 > Nul
- If Exist C:\Registry_Backups\SOFTWARE Ren C:\Registry_Backups\SOFTWARE SOFTWARE.OLD 2>&1 > Nul
- If Exist C:\Registry_Backups\SYSTEM Ren C:\Registry_Backups\SYSTEM SYSTEM.OLD 2>&1 > Nul
- If Exist C:\Registry_Backups\NTUSER.DAT Ren C:\Registry_Backups\NTUSER.DAT NTUSER.OLD 2>&1 > Nul
- If %Errorlevel% GTR 0 (
- @Echo Set oWshShell = WScript.CreateObject^("WScript.Shell"^) > %Tmp%\Popup.vbs
- @Echo oWshShell.Popup "Error Backing Registry Hives" , 15, "Registry Hive Backup Error", 0 >> %Tmp%\Popup.vbs
- Wscript %Tmp%\Popup.vbs
- )
- If Exist "%Tmp%\Popup.vbs" Del %Tmp%\Popup.vbs >nul
- REG SAVE HKU\.DEFAULT C:\Registry_Backups\DEFAULT
- REG SAVE HKLM\SAM C:\Registry_Backups\SAM
- REG SAVE HKLM\SECURITY C:\Registry_Backups\SECURITY
- REG SAVE HKLM\SOFTWARE C:\Registry_Backups\SOFTWARE
- REG SAVE HKLM\SYSTEM C:\Registry_Backups\SYSTEM
- REG SAVE HKCU C:\Registry_Backups\NTUSER.DAT
- :IsAdmin
- Reg query "HKU\S-1-5-19\Environment"
- If Not %ERRORLEVEL% EQU 0 (
- Cls & Mode CON LINES=5 COLS=48 & Color 0C & Title - WARNING -
- Echo.
- Echo.
- Echo YOU MUST HAVE ADMINISTRATOR RIGHTS TO CONTINUE
- Pause >Nul & Exit
- )
- Cls
- Goto :EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement