Windows 10: Backup Registry Hives

Discus and support Backup Registry Hives in Windows 10 Backup and Restore 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 Backup and Restore' 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. Windows10 corrupts SYSTEM registry hive minutes after installation

    in Windows 10 Installation and Upgrade
    Windows10 corrupts SYSTEM registry hive minutes after installation: Hi, I'm having an issue with my HP EliteBook 840 G4 After installing windows10, everything seems fine, then I connect to the internet through wifi. Windows starts installing updates, driver updates and optional features... Then, after a few minutes connected, windows...
  3. Backup Registry Hives

    in Windows 10 Support
    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:...
  4. Is it good to backup the registry on a thumb drive?

    in Windows 10 BSOD Crashes and Debugging
    Is it good to backup the registry on a thumb drive?: I am trying to learn the registry so it is essential I have a good backup. https://answers.microsoft.com/en-us/windows/forum/all/is-it-good-to-backup-the-registry-on-a-thumb-drive/af194a36-c956-475a-98aa-9cc63e565e0f
  5. Is it necessary to backup the registry?

    in Windows 10 Backup and Restore
    Is it necessary to backup the registry?: When I used Windows 7, I used a program called RegBak to backup the registry. You could even restore the registry with it if the system didn't boot. I also found this article, How to restore Registry from its secret backup on Windows 10, but my "secret backup" is empty. I...
  6. What is COMPONENTS registry hive in Windows\System32\config directory

    in Windows 10 Customization
    What is COMPONENTS registry hive in Windows\System32\config directory: What is the COMPONENTS registry hive in Windows\System32\config directory to be the keys name after being loaded in regedit ? 101807
  7. Unable to restore cCleaner registry backup

    in Windows 10 Backup and Restore
    Unable to restore cCleaner registry backup: Hello everyone. I just migrated over from the Seven Forums where I've gone for assistance since Win7 came out. That old computer's power supply finally lost its smoke this week. I have a new HP Pavillion desktop PC and have already done something stupid. Don't scold me, I'll...
  8. Registry Backup File Size Is Growing

    in Windows 10 Backup and Restore
    Registry Backup File Size Is Growing: I've backed up my registry twice recently, and I noticed a huge difference in the size of the backup file. Two days ago, the backup I created was 18,066 KB. The one I created this morning is 247,691 KB. Should I be concerned about this, and, if so, what can I do about it? 29317
  9. Backup Registry, Reset Windows, and Restore Registry afterwards

    in Windows 10 Installation and Upgrade
    Backup Registry, Reset Windows, and Restore Registry afterwards: This could be one of the ridiculous post have ever made. But, I have been wondering what will happen if I backup all of the registry keys, reset Windows 10, and then restore the registry keys? Will it affect device driver? Will the device be bricked? 62996
  10. Why windows 8 registry hive cannot be restored into windows 10

    in Windows 10 Installation and Upgrade
    Why windows 8 registry hive cannot be restored into windows 10: Why windows 8 registry hive cannot be restored into windows 10 I got onto windows 8 and: I saved /backed up HKEY_USERS\.DEFAULT key into a file in registry hive format I saved /backed up HKEY_USERS\<user/my SID> key into a file in registry hive format I saved /backed...