How to Compare Windows Registry Changes Before and After Installing Software

Flat navy illustration of two translucent panels side by side with differing rows, a magnifier between them and a package icon

Last reviewed: November 25, 2026. This guide on how to compare registry changes was compared with Microsoft documentation, and none of its steps were run on a real PC. The top picture is an illustration.

If you want to know what an installer or a settings change actually wrote to the registry, you can compare registry changes before and after the event. This guide describes a look-only method that uses only tools Windows already includes: export one narrow branch before the change, export it again afterwards, and read the difference between the two files. It does not edit, import, merge or delete anything. For background on how the registry is laid out, read the registry explained in hives, keys and values. For more troubleshooting, browse the PC repair guides on this site.

Quick answer: how to compare registry changes safely

Quick answer

  • Choose one narrow branch, export it to a .reg file before the change, export it again afterwards, and keep both files in a new folder.
  • Compare the two files with fc, or with PowerShell Compare-Object, and read only the lines that differ.
  • Treat the diff as a record. Timestamps and usage lists often differ on every run, so they are noise.
  • Never import the exported files, never merge them, and never delete a key you see in the diff. Ask the vendor or use the program's own uninstaller.
  • Back up first. If you can, run the method on a test machine, in a virtual machine or in Windows Sandbox where your edition supports it.

In this guide

Why compare registry changes at all?

Installers and settings tools write to the registry. Windows and many programs keep configuration there, so a single install can add keys, change values and register services or startup entries. When a program behaves oddly, or when you need a written record of what a product left on the PC, a before-and-after view answers the question what changed? more reliably than memory does.

The method has limits. A diff shows what was written during the window you chose, not why it was written. It cannot prove that a value is harmless, and a change made by something else during the same window will appear in the diff too. Read the diff as evidence to ask about, not as a verdict.

This guide is about the comparison. It is not a guide to reading one value or finding a key by name. For a single value at the prompt, read reg query for reading the registry. To locate a key when you know a name, read how to search the registry for a program. Whether a .reg file is safe to open or run is covered in checking whether a .reg file is safe to run, and this guide never asks you to run one.

Some entries that an install leaves behind are covered by leftover registry entries after uninstalling. For startup locations, the separate check is Autoruns for checking startup entries. A registry that is damaged rather than changed is a different problem, so read the common symptoms of registry problems or the corrupted registry guide if the PC is failing in other ways, such as with the log space message in how to fix error 1019 (0x800703FB). Whether a registry cleaner helps is a separate question, covered in the registry cleaner guide for Windows 11.

Before you start: back up and check permission

Before you start

This method is look-only, but it still works with your PC's configuration. Back up the branch you are working with, and keep your personal files backed up, before you begin. Read backing up the registry before any change first. If this PC is managed by your organization, ask the administrator before you run the exports or the installer. If the device uses BitLocker, keep the recovery key somewhere safe before you restart.

Good to know

Exported files can contain account names, folder paths and sometimes license-related text. Keep them in your own folder and do not share them publicly.

Run the commands in an ordinary Command Prompt or PowerShell window that you open yourself. If Windows reports access denied, stop and ask the administrator rather than opening the window as administrator by reflex. Elevation is not needed to create a file in your own Documents folder.

The route at a glance

Follow the route in order. Each stop is one step below, and only the install itself changes anything on the PC.

  1. Choose the branch Pick one narrow key that belongs to the vendor or product, not the whole registry.
  2. Export before Save a copy of that branch to a .reg file in a new folder.
  3. Run the install or change Let the installer or settings change finish, and close its window.
  4. Export after Save a second copy of the same branch with a different file name.
  5. Compare and read Use fc or Compare-Object, then read the lines that differ and document them.

Step by step: export, compare, read

Each step ends with what you should see and what to do if it fails. Do not skip the folder step, because it keeps the two exports apart from anything else.

Step 1: Create a new folder for the exports

Create a folder with a clear name. Using a new folder for each run stops old exports from mixing with new ones.

mkdir "%USERPROFILE%\Documents\RegCompare\run1"

You should see: no message if the folder is new. Open Documents in File Explorer and find a folder called RegCompare containing run1.

If this fails: if the folder already exists, that is fine. If it holds files from an earlier run, use a new name such as run2 so the two sets of exports stay separate.

Step 2: Choose a narrow branch and check its size

Pick the branch that belongs to the product, for example HKLM\SOFTWARE\ExampleVendor for machine-wide settings or HKCU\Software\ExampleVendor for settings of the signed-in user. Common root key names are HKLM, HKCU, HKCR, HKU and HKCC, and the Microsoft reg export page lists these five as its valid root keys. Use the vendor's documentation or the install folder to find the right name.

Do not export all of HKLM or all of HKCU. A large export takes longer to write, produces a very large file, and fills the diff with unrelated writes from Windows and other programs. A narrow branch makes the diff readable, and it is quicker to check against the vendor's own list.

You should see: a branch path you can paste into a command, and a short note of what you expect the product to write there.

If this fails: if you cannot find a vendor key, do not widen the export to a whole hive to compensate. Ask the vendor which key the product uses, or read the diff from a test machine instead.

Step 3: Export the before file

The reg export command copies the specified subkeys, entries and values into a file for transfer. It does not change the keys it reads. The file must have a .reg extension. The output name here is new, so the optional overwrite switch is left out on purpose: that switch overwrites an existing file without asking.

reg export "HKLM\SOFTWARE\ExampleVendor" "%USERPROFILE%\Documents\RegCompare\run1\before-vendor.reg"

You should see: a message that the operation completed successfully, which is the usual report for a successful export. Then the file before-vendor.reg appears in the run1 folder.

If this fails: an access message means stop and ask the administrator, not elevate by reflex. A message that the key cannot be found means the path is wrong, so check the spelling. If the file name already exists, choose a new name rather than adding the overwrite switch.

Step 4: Run the install or the change

Run the installer or settings change the way the vendor describes. Let it finish, close its window, and follow any restart it asks for. Do not open Registry Editor and edit values during this window, because that would put your own edits into the diff.

Some programs write their settings only on first run. If that applies, open the program once as the vendor suggests, close it, and then export. Write down what you did and when, so the diff can be explained later.

You should see: the installer or change completes, and the product is ready to use or the setting is applied.

If this fails: if the installer stops halfway, do not run it again inside the same window. Read the Windows Installer service error guide, then take the after export only once the install state is clear.

Step 5: Export the after file

Use the same branch and the same command, with a different output name. Keeping the branch identical is what makes the two files comparable.

reg export "HKLM\SOFTWARE\ExampleVendor" "%USERPROFILE%\Documents\RegCompare\run1\after-vendor.reg"

You should see: the same success message, and a second file called after-vendor.reg in the same folder.

If this fails: the same fixes as step 3 apply. If the after file is much larger than the before file, note it, because a large change needs a careful read.

Step 6: Compare the files with fc

The fc command compares two files. Microsoft describes the /L switch as comparing files in ASCII mode, line by line, and attempting to resynchronize after a mismatch; it is the default mode for text files outside the binary extension list. The Microsoft fc page describes the /U switch as comparing files as Unicode text files. The Microsoft Learn page we opened does not say which encoding reg export writes, so do not assume. If the first comparison looks wrong, run the same pair again with /U and compare the results.

fc /l "%USERPROFILE%\Documents\RegCompare\run1\before-vendor.reg" "%USERPROFILE%\Documents\RegCompare\run1\after-vendor.reg" > "%USERPROFILE%\Documents\RegCompare\run1\diff-vendor.txt"

The redirect symbol saves the output to a text file, so you can read it at leisure. It replaces any existing file with the same name without asking, so choose a new name if diff-vendor.txt already exists.

You should see: either a message that no differences were found, or the differing lines shown with the line numbers of each file. The saved diff-vendor.txt opens in Notepad for reading.

If this fails: if every line looks different, the two files may be encoded differently or one export may be empty. Check that both files have content, then run the comparison with /U in place of /L. Run fc /? on your PC to see the switches your version lists.

Step 7: Compare the files with PowerShell

PowerShell's Compare-Object compares two sets of objects. The Microsoft Learn page describes a reference set and a difference set, and it marks each line with a side indicator. A less-than sign marks a line that appears only in the reference set, which here is the before file. A greater-than sign marks a line that appears only in the difference set, which is the after file. Get-Content reads the text of a file, and its -Path parameter takes the file name.

$before = Get-Content "$env:USERPROFILE\Documents\RegCompare\run1\before-vendor.reg"
$after = Get-Content "$env:USERPROFILE\Documents\RegCompare\run1\after-vendor.reg"
Compare-Object $before $after

You should see: the lines that differ, each marked with the side indicator. A line marked with a less-than sign existed only before. A line marked with a greater-than sign exists only after.

If this fails: if the text looks garbled, the encoding may not match what Get-Content expects. We did not confirm the list of encoding values on the Get-Content page we opened, so run Get-Help Get-Content on your PC before you change any setting, or use the fc comparison instead.

Step 8: Stop and record the result

Write a short note beside the diff: the date, the branch, the product and version, and which lines you think belong to the install. Keep the note with the two exports, in your private folder. Then stop. Do not import either file to test it, and do not delete anything in the diff.

You should see: a documented record that explains each difference you could identify.

If this fails: if a difference cannot be explained, leave it documented and ask the vendor. An unexplained line is a question, not a cleaning job.

Reading the diff: what matters and what is noise

A diff only helps when you can tell signal from noise. Most of the lines you see will belong to one of three groups: lines the install was meant to write, lines that change every run, and lines from unrelated background activity. Read the lines in that order, and keep a list of anything you cannot place.

Lines that point to the install

Start with the lines that sit under the branch you chose and that match the product's name, version or install folder. These are the lines most likely to come from the install. A version number that moved from one release to the next is a typical example, as is a new install path or a new sub-key under the product's own name. If a service entry from the install does not start afterwards, read the service missing error 1060 guide before you change anything.

Lines that are probably noise

Then set aside the noise. The following lines commonly change without any link to the install, and they are not a reason to act:

  • Timestamps, such as a last-checked or last-run value, which move on every run.
  • Most-recently-used lists, which record what you opened and in what order.
  • Usage counters and window positions, which the program updates as you use it.
  • Unrelated background writes, for example from an update service or a sync tool that writes during the same minutes as your install.

The policy layer also writes values. If a line looks like a managed setting, read the difference between Group Policy and registry settings before deciding what it means. A managed browser message is one example of a policy-driven setting, covered in browser managed by your organization. A line under a per-user branch can come from your own account, so the per-user registry files explains where those writes live. If a diff line is really a value that will not stay set, that is a different question, covered in registry changes not saving or reverting.

If you are not sure which part of the PC a line belongs to, the Repair Assistant can help you narrow the path without changing anything on the PC.

A decision tree for each line

Use this order for every line you cannot place immediately. It ends in documentation, never in a change to the registry.

  • Is the line under the branch you exported, and does it match the product name, version or install folder?
    • Yes: it is probably from the install. Document it with the value name and the path.
    • No: go to the next question.
  • Does the line look like a timestamp, a usage list or a window position?
    • Yes: classify it as expected noise and leave it.
    • No: go to the next question.
  • Does the line sit in a Run key, a Services branch or a scheduled task reference?
    • Yes: it can start something at sign-in or as a service. Read registry startup entries and Run keys, and do not remove it. Ask the vendor or use the uninstaller.
    • No: go to the next question.
  • Can you explain the line with the vendor's documentation or the install record?
    • Yes: document the explanation next to the line.
    • No: write the question down and ask the vendor, or the administrator on a managed PC.

Which branches installers usually touch

The table below is general guidance, not a list from any vendor. Real products differ, and some write nothing under the usual branches. Use it to decide which branch to export and what to look for in the diff. For the 32-bit side of the machine branch, read Wow6432Node and the 32-bit and 64-bit views before you assume a copy is wrong.

BranchWhat installers often writeWhat to note in the diffCaution
HKLM SOFTWAREProduct settings, install paths and version numbers for machine-wide useThe product name, version and install folder under the vendor's keyChanges here affect every user, so confirm with the vendor before you act
Wow6432NodeSettings for 32-bit programs on 64-bit WindowsA parallel copy of the vendor key, which a 32-bit program may readA copy is not necessarily an error, so read the views explanation first
HKCU SoftwarePer-user settings, preferences and first-run flagsLines that match your own account and the product nameMany lines here are usage data, so expect noise
Uninstall keys under CurrentVersionDisplay name, version and uninstall command for installed appsA new entry that matches the product's name and versionUse the uninstaller in Settings. Do not remove the entry by hand
Services under SYSTEMBackground services the product runsNew service names and their start typeA service can run without any window, so document it before you act
Run keysPrograms that start at sign-inA new entry that points to the product's program fileRead the startup guide first. Do not delete the entry from the diff

Worked example (illustration only)

This is an illustration. The sample values below are made up for teaching purposes. They are not real output from any product or PC.

Suppose a product called ExampleVendor Widget was installed, and the branch HKLM\SOFTWARE\ExampleVendor was exported before and after. The compare step produced these lines, shown with the side indicators in plain text.

<= "Version"="2.1"
=> "Version"="2.2"
<= "LastChecked"="1699000000"
=> "LastChecked"="1700000000"
=> [HKLM\SOFTWARE\ExampleVendor\Widget\Telemetry]
=> "Enabled"="1"

Reading the example, the Version line changed as you would expect from an update, so it is the line to document first. The LastChecked line is timestamp noise and needs no action. The Telemetry key is a new sub-key that the vendor's documentation would have to explain, so it is a question for the vendor. None of these lines is a reason to import the after file or to delete anything. Document the Telemetry key, ask the vendor what it does, and use the product's own settings or uninstaller if you want the product gone.

A safer place to test

The cleanest way to see what an install does is to run it on a test machine that you can afford to rebuild, or inside a virtual machine. A test machine keeps the diff focused on one product, because your everyday apps are not part of the comparison.

Windows Sandbox is a built-in option on some editions. Microsoft's Windows Sandbox page says it is supported on Windows Pro, Enterprise and Education, and that it is not supported on Windows Home. The same page says it uses hardware-based virtualization to run a separate kernel, so the feature needs virtualization support on the PC. Turning on the feature is itself a change, so check with the administrator on a managed device first, and read the Microsoft page for the current steps.

Inside the sandbox, run the same export, install and compare steps, and treat the results as evidence about that product only. Do not copy a diff from the sandbox onto your own PC by importing it. The sandbox is for looking, and this guide never asks you to import a .reg file. To understand what a restore point does and does not roll back, read whether System Restore restores the registry. A restore point is a recovery option, not a way to test the method.

Live activity with Process Monitor

A before-and-after export shows the result of a change. It does not show the moment a program wrote a value. For that, Process Monitor is the Microsoft tool to use. The Sysinternals page on Microsoft Learn describes it as an advanced monitoring tool for Windows that shows real-time file system, Registry and process and thread activity. It also describes non-destructive filters, which let you set filters without losing data, and filters that can be set for any data field.

Use it in look-only mode. Start the capture just before the install, set a filter so that only the installer's process and Registry activity are shown, and read the events as they happen. Stop the capture, and save it to a file in your private folder if you want a record. Process Monitor records a lot of activity, so a tight filter matters, and a capture can contain paths and account names, so keep it private. We did not open the list of operation names on that page, so match the names to what your version shows rather than to a list from this guide.

Process Monitor and the export diff answer different questions. The diff tells you what the registry looked like before and after. Process Monitor tells you which process wrote a value and when. Use both when a line in the diff is unexplained.

What not to do

  • Do not import, merge or double-click any exported .reg file to test it. Importing changes the registry.
  • Do not delete any key or value you find in the diff, even one that looks like leftover junk. Ask the vendor or use the program's own uninstaller.
  • Do not use a registry cleaner to tidy up the lines. No Microsoft page we opened documents a speed or repair benefit of registry cleaning.
  • Do not edit a value by hand to see what happens. A test is a comparison, not an experiment on your live settings.
  • Do not run scripts or tools you do not recognise to automate the diff. The steps above use only built-in commands and a Microsoft tool.

Frequently asked questions

The method and the commands

Does reg export change my registry?

The Microsoft reg export page describes the command as copying the specified subkeys, entries and values into a file for transfer. It names an output file, and it does not describe importing or changing the keys it reads. Keep the output file private and do not import it.

Why not export the whole HKLM hive?

A whole hive is very large, takes time to export, and fills the diff with writes from Windows and other programs. A narrow branch that belongs to the product is far easier to read. If you cannot find the product's branch, ask the vendor rather than widening the export.

Why does fc show every line as different?

The most likely reasons are that the two files are encoded differently, or that one export is empty. Check that both files have content, then run the comparison with the /U switch, which the fc page describes as comparing files as Unicode text files. The Microsoft page we opened does not say which encoding reg export writes.

Can I use the diff to remove leftover keys?

No, not in this guide. The diff is for understanding and documentation. For entries left behind after a program is removed, read leftover registry entries after uninstalling and use the uninstaller or the vendor's guidance first.

Tools, editions and safety

Is Windows Sandbox available on Windows Home?

Microsoft's Windows Sandbox page says it is not supported on Windows Home. It is listed for Windows Pro, Enterprise and Education, and it needs hardware-based virtualization. On a Home PC, use a test machine or a virtual machine that you manage yourself.

Is Process Monitor safe to use for this?

Process Monitor is a Microsoft Sysinternals tool, and the way this guide uses it is look-only: you filter and read events. Its captures can contain paths and account names, so keep any saved file private, and do not treat a capture as a list of things to delete.

Should I import the after file to see if it works?

No. Importing a .reg file writes its contents into the registry, and this guide never asks you to do that. Use the diff to explain what changed, and ask the vendor how the product should be removed or reconfigured.

How is this different from reading one value?

Reading one value shows what is stored now at one path. Comparing two exports shows what changed between two moments, across a whole branch. To read one value at the prompt, see reg query for reading registry values, which is a separate task from this comparison.

How this guide was checked

The commands and switches were compared with Microsoft Learn pages for reg export, fc, Compare-Object and Get-Content, and with the Microsoft pages for Windows Sandbox and Process Monitor. The steps were not run on a real PC, and no testing or lab results are claimed. Where a Microsoft page did not state a point, such as the encoding that reg export writes or the list of Get-Content encoding values, the text says so and does not rely on it. The top picture is an illustration, and the worked example uses made-up values.

Sources