How to Back Up the Windows Registry Before Any Change: 4 Methods Compared

Hierarchical tree of key and folder icons on the left, a thick arrow, and a glass shield holding a copy of the tree and a USB drive on the right
Hierarchical tree of key and folder icons on the left, a thick arrow, and a glass shield holding a copy of the tree and a USB drive on the right

Before you change anything in Windows, you should know how to back up the Windows registry. The registry holds settings for Windows and for the programs you install, and one wrong change can stop an app from starting or even stop Windows from booting. This guide compares four ways to protect yourself, shows how to test and restore each backup, and lists the limits you need to know. We wrote it in plain language for beginners, and every step is for Windows only.

Last reviewed: November 24, 2026. We compared the steps with Microsoft documentation where we read the pages. None of these steps was run on a real PC for this guide.

Quick answer

Quick answer

  • To protect one program or one setting, export its key in Registry Editor with File and Export.
  • For a script or a branch you back up often, use the reg export command.
  • Before a driver, an update or a system tool, create a System Restore point.
  • For the biggest risk, keep a full system image on a drive that is not C:.

Contents

Why you should back up the Windows registry first

The registry is a database that Windows and many apps read each time they start. Microsoft's reg command documentation (see Sources) covers the command syntax; the warnings here are general advice. The registry editor bypasses standard safeguards, so a change can degrade performance, damage your system or even force you to reinstall Windows. If you must edit the registry directly, back it up first. If you want to try a change safely first, test it in Windows Sandbox or a virtual machine. Some people also wonder whether registry defragmentation is necessary, and we answer that in a separate guide.

Many people reach the registry through a cleaning tool instead of by hand. If you are thinking about a registry cleaner for Windows 11, make a backup before you run one. If a cleaner already changed your PC, read our guide on how to undo registry cleaner changes first. That article owns the undo routes, so this one stays on protecting the registry before the next change. Leftover entries from an old program are a separate case, covered in our guide to leftover registry entries after uninstalling Windows.

If the terms are new to you, our guide to what the registry hives and keys are explains them. A key is like a folder, a value is a setting inside a key, and a hive is a top-level group such as HKEY_CURRENT_USER. You do not need to edit anything to make a backup, which is good news for beginners.

Backups matter most when a problem has already started. If you are chasing common registry problems and their causes, make sure you can roll back before you change anything else. A backup is also the first thing to check when a cleaner has been run, because what registry cleaner errors mean is often unclear until you know what changed.

Four methods compared

The table below compares the four methods side by side. Read the limits column before you rely on any single method, because the most common mistake is to assume one exported key protects the whole registry.

MethodWhen to use itHow to restoreLimits
1. Registry Editor export. Covers one key, its subkeys and its valuesBefore you change one program or one settingFile, then Import in Registry Editor, then restartNot a full registry backup. Only the exported branch is saved.
2. reg export command. Covers one key path you name, written to a .reg fileScripts, repeat backups and branches you name oftenreg import with the same file, then restartSame branch-only limit. The key path must be exact.
3. System Restore point. Covers system files, installed programs, registry settings and system settings at one momentBefore a driver, an update or a system-level toolSystem Restore from System Properties or recovery optionsProtection must be on. Not a copy of your files. Programs and drivers added later can be removed.
4. Windows Backup (Not a registry backup, for comparison). Backs up files, settings and apps to a Microsoft account or OneDriveKeeping copies of your files and settings. It does not replace Methods 1 to 3Restore files and settings with Windows BackupDoes not back up the registry and is not a full system image. Does not replace a registry or restore-point backup.

Which backup do you need

Use this decision tree to choose a starting method. You can combine methods, and for a risky change we recommend that you do.

  • Are you changing one program or one setting?
    • Yes: use Method 1 to export that branch.
      • Will you repeat this, or run it from a script? Use Method 2.
    • No: go to the next question.
  • Are you installing a driver, a Windows update or a system-level tool?
    • Yes: create a System Restore point with Method 3.
  • Would losing the whole PC be a serious problem?
    • Yes: make a full system image on a drive that is not C:, with a separate imaging tool. Windows Backup in Method 4 is not a full system image.

Method 1: export a key in Registry Editor

This is the simplest method. It saves one key and everything below it. Microsoft's page shows the export and import steps; the names of the export options can differ between Windows versions, so we follow the same order here. If Registry Editor will not open at all, see our guide on when Regedit is disabled.

Steps to export a key

  1. Open Registry Editor. Select Start, type regedit.exe in the search box and press Enter. Confirm any administrator prompt.

    You should see: Registry Editor opens with a tree of root keys on the left.

    If this fails: Your account may not have administrator rights. Sign in as an administrator, or ask the person who manages the PC. If one specific key refuses access, see how to fix registry permission errors.

  2. Click the key you want to save, once, in the left pane. Choose the smallest key that covers the change, not the top of the tree.

    You should see: The key is highlighted and its path appears in the address bar.

    If this fails: The key may have been moved or removed. Select its parent key and export that instead.

  3. Select File, then Export.

    You should see: The Export Registry File dialog box opens.

    If this fails: If Export is greyed out, close the dialog and select the key again.

  4. Under Export range, choose Selected branch (the option name can differ between Windows versions). Type a file name with the date in it, such as MyApp-2026-11-24. Choose a folder outside C: and select Save.

    You should see: A .reg file appears in that folder.

    If this fails: The folder may be read-only or the drive may be full. Choose another folder that has free space.

What this method covers

This method saves the key, its subkeys and its values. It does not save the rest of the registry, and that is the most important limit of Method 1. If a change touched two different keys, export both of them.

General advice: importing a .reg file merges or overwrites existing values, a restart may be needed for changes to take effect, and administrator rights are required.

For a program you use every day, you can also check the app's own settings before you touch the registry. Where Control Panel or Microsoft Management Console offers the setting, use that first; if a policy locks it, see how Group Policy differs from the registry. Microsoft's reg command documentation (see Sources) covers the command syntax; the warnings here are general advice. Our guide to startup entries in the Run keys shows where some programs store their start-up settings. To see what an installer changed before you decide on a backup, you can compare registry changes before and after an install.

Method 2: the reg export command

The reg export command does the same job from a Command Prompt window. It suits scripts and for branches you back up often. To look at a key before you export it, the reg query command reads it without changing anything. Microsoft Learn's reg export page gives the syntax: a key path that starts with a root key such as HKLM, HKCU, HKCR, HKU or HKCC, then a file name that must end in .reg. The optional /y switch overwrites an existing file without asking, so leave it out until you are sure.

  1. Open Command Prompt. Select Start, type cmd and press Enter. Choose Run as administrator if the key sits under HKLM, which applies to the whole PC.

    You should see: A black window with a prompt that ends in a greater-than sign.

    If this fails: If Windows says the command is not recognized, check the spelling of the command and make sure there is a space after reg export.

  2. Type the export line below. Replace the key path with your own, and keep the quotes around the file name. Press Enter.

    reg export HKCU\Software\MyApp "D:\RegistryBackups\MyApp-2026-11-24.reg"

    You should see: The message "The operation completed successfully."

    If this fails: If you see "The system cannot find the path specified", create the folder D:\RegistryBackups first, or check the key path for a typo.

For a script, put the same line in the file and check the result. Microsoft's page says the operation returns 0 on success and 1 on failure, so your script can test that value before it goes on. Note that the command has the same branch-only limit as Method 1. It is a good habit to keep one dated file per key you change.

Method 3: a System Restore point

A restore point is a safety net for the system, not a file backup. Microsoft's System Protection page says a restore point is a snapshot of system files, installed applications, the Windows Registry and system settings at one moment. That makes it useful before a driver, an update or a system-level tool, because you can return the whole system to that moment.

Protection must be on for this to work. The System Protection page says it is not enabled by default and recommends turning it on. Check it first, because a restore point cannot be made while protection is off. Our guide on how to use System Restore covers the restore side in more detail.

Steps to create one

  1. Open System Properties. Select Start, type Create a restore point and select it from the results.

    You should see: System Properties opens on the System Protection tab.

    If this fails: If the window does not open, sign in as an administrator and try again.

  2. Check protection for the C: drive. If it shows Off, select the drive, choose Configure, select Turn on system protection, set a sensible amount of space with the slider and select Apply.

    You should see: The C: drive shows protection as On.

    If this fails: Check that the drive has free space and that you have administrator rights, then try again.

  3. Select Create, type a clear name such as Before driver install, and select Create again.

    You should see: A message confirms that the restore point was created successfully.

    If this fails: Free up disk space and try again. General advice: if it still fails, check the Event Viewer for errors that mention System Restore.

Limits

General advice: a restore point does not replace copies of your documents, photos or other files. Programs and drivers installed after the point can be removed when you restore, so note what you added since then.

Method 4: Windows Backup (Not a registry backup, for comparison)

Windows Backup is the Microsoft app that backs up your files, settings and apps to a Microsoft account or OneDrive. It does not back up the registry, and it is not a full system image. It therefore does not replace the registry export in Method 1 or 2, or the restore point in Method 3. It is included here only for comparison, so you can see what it protects and what it does not.

Microsoft's Back up and restore with Windows Backup guide covers the app and its options. Check that guide for the options your version of Windows offers. Our guide to backing up your Windows PC files goes through the file side in more detail.

  1. Open the Windows Backup app and sign in with the Microsoft account you use on the PC.

    You should see: The app shows which folders, settings and apps it can back up.

    If this fails: Check that you are online and signed in to your Microsoft account, then try again.

  2. Choose the items you want to back up, as the app offers them.

    You should see: The app lists the items it will back up.

    If this fails: If an item is not listed, check the storage space in your Microsoft account or OneDrive and try again.

  3. Start the backup and wait until the app reports that it has finished.

    You should see: The app reports that the backup completed.

    If this fails: Note the exact error text and search the Microsoft Support site for it before you try again.

General advice: because this backup does not cover the registry, make a registry export or a restore point before any registry change, even if Windows Backup has run recently.

How to name and store your backups

A good name tells you what the file is and when you made it. Use the app or key name, then the date in year-month-day order, with no spaces. For example, MyApp-2026-11-24.reg is clear, and final-final-2.reg is not. Keep the date in the name even when the folder already shows it, because files get copied and renamed.

Store the backup outside C:, on a second drive or a USB drive. General advice: keep a copy off the PC as well, because a failed drive can take the original and the backup together. Put the registry files in one folder, such as D:\RegistryBackups, so you can find them when you need them.

How to test a .reg file in Notepad

A backup that cannot be read is no backup at all. Test each .reg file before you rely on it. Do not double-click the file to test it, because double-clicking merges the file into the registry, which is the opposite of a test.

Instead, open Notepad, choose File and then Open, and pick the .reg file. General advice: a valid file starts with a line that reads Windows Registry Editor Version 5.00, followed by key names in square brackets and the values beneath them. You do not need to change anything in the file.

If Notepad shows an empty file, or text that is clearly not a registry export, make the export again. A file that has been opened and saved in another program may also be damaged, so keep the original and work from a copy.

How to restore a backup

Restoring means importing the file back into the registry. Only import a file you made yourself, or one from a source you trust (read a .reg file before running it). Microsoft's page describes the Registry Editor route, which we follow here.

  1. Open Registry Editor with regedit.exe.
  2. Select File, then Import.
  3. Select your .reg file and click Open.
  4. Restart the PC.

From Command Prompt, the same restore is reg import followed by the file path in quotes. Use this only with a file you have already tested in Notepad.

reg import "D:\RegistryBackups\MyApp-2026-11-24.reg"

General advice: importing a .reg file adds and changes the values it contains. Microsoft's page does not say whether an import removes keys you created after the export, so do not assume it does, and do not assume it does not. Check the result after you restart.

Warning: A .reg file restores only the branch it holds, not the whole PC. Do not double-click a file that came from someone else. General advice: the live registry files that Windows is using cannot simply be copied while Windows runs, so use Registry Editor export, reg export or a system image instead.

If Windows does not start after the restore, use the recovery options to open System Restore or Safe Mode. General advice: Safe Mode loads only core drivers and services, which lets you apply a restore point and undo the most recent change. Our guide to the automatic repair loop covers the start-up failures in more detail.

Before you touch anything

Use this checklist each time. It takes a few minutes, and it saves hours when a change goes wrong.

  • Write down what you plan to change and why.
  • Confirm that you are signed in as an administrator.
  • Export the key you will change with Method 1 or Method 2.
  • Create a System Restore point with Method 3 if protection is on.
  • Store every backup outside C:, with the date in its name.
  • Open each .reg file in Notepad to confirm it is valid.
  • Close the program you plan to change, so it does not write over your change.
  • Check that the drive has free space for the backup and for a restore.

Examples

Example 1: a single program. Before you change how a photo editor starts, export its key under HKCU\Software with Method 1. Save the file as PhotoEditor-2026-11-24 on D:, and test it in Notepad. If the change goes wrong, import the file and restart.

Example 2: a driver install. Before you install a new graphics driver, create a restore point named Before graphics driver. If the driver causes problems, use System Restore to go back to that point. Our guide on SFC and DISM repair for system files helps if the system files are damaged after the restore.

Example 3: a monthly script. A small script can export the same key every month, writing a new dated file each time. The line below is a sample. Change the key path and folder to match your own setup.

reg export HKCU\Software\MyApp "D:\RegistryBackups\MyApp-2026-11.reg"

Keep an eye on the start-up settings too, because some programs add entries there. You can review them as described in our guide to registry start-up entries, and back up the key before you change any of them. If an entry looks like malware, read our guide on checking malware registry entries safely before you delete anything, and back it up first.

When to stop

Stop at once if a backup fails, if a .reg file is empty, if the disk is full or if Windows shows errors you do not understand. Do not keep making changes on top of a failed backup. Restore from the last good point instead, and check the file before you try again.

If the PC will not start properly, or the system files look damaged, the next step is repair rather than more registry work. Our guide to SFC and DISM repair for system files is the place to start. If the registry itself is damaged, our guide to repairing a corrupted registry covers that case. If repair fails, our guide to resetting Windows 11 and keeping files explains the next option. For a guided path through these choices, the Repair Assistant can help you decide which step to take.

Windows 10 note

Support for Windows 10 ended on October 14, 2025. After that date Microsoft's page says it no longer provides software updates, technical assistance or security fixes for Windows 10, and it recommends moving to Windows 11. According to Microsoft's pages, consumer Extended Security Updates for Windows 10 run until October 12, 2027. The steps in this guide work on Windows 10 as well as on Windows 11. On an older system, a restore point and a full image matter even more, so check them first. You can find more help in our PC repair guides.

Frequently asked questions

Backup basics

How often should I back up the registry?

Back up before every change you make to it, and before any driver, update or cleaning tool. Keep the newest tested file, and delete older copies only after a new one has opened correctly in Notepad.

Is one exported key a full registry backup?

No. An export saves one branch, with its subkeys and values. For the whole system, use a System Restore point with Method 3 or a full system image made with a separate imaging tool.

Does reg export back up the whole registry?

No. The reg export command works on one key path at a time, so it is a branch backup. It is good for scripts and repeat backups of the keys you change most often.

Where should I store my registry backups?

Store them on a drive that is not C:, with the date in the file name. General advice: keep a second copy on a USB drive or another location off the PC, so one failure cannot take both copies.

Restoring and limits

Can I double-click a .reg file to restore it?

You can, but only for a file you made yourself and have tested. Do not double-click a file just to test it, because that merges the file into the registry. Open it in Notepad to check it first.

Does importing a .reg file remove keys I added later?

Microsoft's page does not say either way, so treat the answer as unknown. General advice: an import adds and changes the values in the file, so check the result after you restart and do not rely on the import to clean up later changes.

Will System Restore delete my documents?

General advice: System Restore is aimed at system files, installed programs, drivers and settings, and it does not replace your personal files. It can remove programs and drivers you installed after the restore point, so note them before you restore.

What if Windows will not start after a change?

Use the recovery options to try System Restore, or start in Safe Mode and undo the last change. General advice: keep your backup file and your restore point until the PC is stable again, and do not make a second change while you are still troubleshooting.

Sources