Windows 10: Backup Registry Hives

Discus and support Backup Registry Hives in Windows 10 Support to solve the problem; As many of us knows that latest version of Windows 10 won't backup registry hives which could be needed when Windows 10 won't boot because of registry... Discussion in 'Windows 10 Support' started by FreeBooter, Jan 13, 2019.

  1. Backup Registry Hives


    As many of us knows that latest version of Windows 10 won't backup registry hives which could be needed when Windows 10 won't boot because of registry errors.

    I have created batch script for backing up registry hives this batch script will create two folders at root of C: partition and stores copies of registry hives. The folder named Registry_Backups will contain newly created registry hives and previously created copies of registry hives, these previous backups will have OLD extension. The C:\Registry_Backups\RegOld folder contains previously created registry hive files with OLD extension. This batch script can be schedule to make backup copies of the registry hive files at any given time, i have setup a schedule to make sure my registry hives are backup at logon time.

    Execute the batch script with administrative privileges.

    Code: :: Created By @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\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[/quote]
    Please copy/paste batch scripts codes to Notepad and save it as RegBackup.bat.

    :)
     
    FreeBooter, Jan 13, 2019
    #1
  2. Toast Win User

    How to create a registry hive file from a .reg backup

    Long story short, I accidentally royally screwed up my HKLM\SYSTEM registry directory trying to fix WinApps permissions that were changed with a Windows security patch.

    As of right now, my system is completely unable to boot with a BSOD message of "inaccessible boot device" caused by my changes. I've tried

    • changing values of registry keys to enable AHCI
    • Safe Mode
    • sfc /scannow + chkdsk
    • Checking for pending packages in DISM
    • Moving files from Regback to /config
    • importing my working backup of SYSTEM.reg into the registry under windows recovery command prompt and WinPE

      One of those would normally work, but my issue is caused by a junk SYSTEM registry.

    I need to create a SYSTEM HIVE file from my .REG backup of the HKLM\SYSTEM directory.

    I thought this would be a very simple solution, but the only thing that I've managed to find on this topic is a random MSDN post from years ago that seems like it would accomplish what I want, but I can't get the script to work. (How to create a brand new registry hive)

    • Trying to run his script as a .bat returns an error stating:function' is not recognized as an internal or external command,
      operable program or batch file.
    • Trying to run the .bat in powershell returns: merge.bat : The term 'merge.bat' is not recognized as the name of a cmdlet, function, script file, or operable
      program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

    If anyone knows how to get the above powershell script to work, please let me know.
     
    Toast, Jan 13, 2019
    #2
  3. Jerry8AB Win User
    Registry Backup - Question

    Registry Backup

    I am reading a book, Windows 10 Anniversary Update. It makes these two statements.

    • File History also keeps a copy of your Registry.
    • Every time you start your computer, it makes a backup copy of that Registry.
    Where and how do I find these copies?

    Thanks,

    Jerry

    5/29/17
     
    Jerry8AB, Jan 13, 2019
    #3
  4. Jacob Win User

    Backup Registry Hives

    How to create a registry hive file from a .reg backup

    The script you have linked is a PowerShell script, it needs to be saved with a .ps1 extension and executed in PowerShell.

    Can you try saving it as a .ps1 file and running it, does this resolve your issues?

    Edit:

    The contents of your .ps1 file should be:

    And then just change this C:\MyHive.reg to point to your .reg file and HiveName to the name of the Hive to be created.
     
    Jacob, Jan 13, 2019
    #4
Thema:

Backup Registry Hives

Loading...
  1. Backup Registry Hives - Similar Threads - Backup Registry Hives

  2. Registry Hive Recovered Windows 7 X64

    in Windows 10 Gaming
    Registry Hive Recovered Windows 7 X64: file: '\??\C:\System Volume Information\Syscache.hve' was corrupted and it has been recovered. Some data might have been lost. https://answers.microsoft.com/en-us/windows/forum/all/registry-hive-recovered-windows-7-x64/d7889e2d-41d1-49d8-ace6-07040061489a
  3. Registry Hive Recovered Windows 7 X64

    in Windows 10 Software and Apps
    Registry Hive Recovered Windows 7 X64: file: '\??\C:\System Volume Information\Syscache.hve' was corrupted and it has been recovered. Some data might have been lost. https://answers.microsoft.com/en-us/windows/forum/all/registry-hive-recovered-windows-7-x64/d7889e2d-41d1-49d8-ace6-07040061489a
  4. Registry Hive Recovered

    in Windows 10 Gaming
    Registry Hive Recovered: file: '\??\C:\System Volume Information\Syscache.hve' was corrupted and it has been recovered. Some data might have been lost. https://answers.microsoft.com/en-us/windows/forum/all/registry-hive-recovered/d7889e2d-41d1-49d8-ace6-07040061489a
  5. Registry Hive Recovered

    in Windows 10 Software and Apps
    Registry Hive Recovered: file: '\??\C:\System Volume Information\Syscache.hve' was corrupted and it has been recovered. Some data might have been lost. https://answers.microsoft.com/en-us/windows/forum/all/registry-hive-recovered/d7889e2d-41d1-49d8-ace6-07040061489a
  6. How-to explore \REGISTRY\A\ hive?

    in Windows 10 Customization
    How-to explore \REGISTRY\A\ hive?: This file does something in \REGISTRY\A\ hive.https://www.virustotal.com/gui/file/21feafefb5eff856a47945000c079d7c8954caf877b03a31b34ea9a546da3d33/behaviorHow-to explore it?...
  7. Registry Backups

    in Windows 10 Backup and Restore
    Registry Backups: Based on a lot of Googling and information from this forum I created the below batch file to backup my Windows 10 registry from an elevated cmd prompt. Everything is working perfectly but I have a question on what I'm backing up. Are there other registry hives/locations that...
  8. Default Registry key Hive?

    in Windows 10 Ask Insider
    Default Registry key Hive?: is it possible to find a such template fr cross-referencing my new install with original defaults anywhere? I would like to check how clean my clean install really is... I'm afraid I have a rootkit or some sort or a hyper-persistent RAT as I've re-installed my OS 15 times+...
  9. Backup System Registry Hives

    in Windows 10 Backup and Restore
    Backup System Registry Hives: Create backups of the system registry hives to C:\Registry_Backups folder. Code: :: Created By @Echo Off & Cls Echo. Echo. Call :IsAdmin If Not Exist C:\Registry_Backups (md C:\Registry_Backups) Else (Goto :Skip) If Not Exist C:\Registry_Backups\RegOld (Md...
  10. Backup Registry Hives

    in Windows 10 Backup and Restore
    Backup Registry Hives: As many of us knows that latest version of Windows 10 won't backup registry hives which could be needed when Windows 10 won't boot because of registry errors. I have created batch script for backing up registry hives this batch script will create two folders at root of C:...