2

I have .reg file which was exported on another PC and contains some keys, values and data from different parts of registry.

How to check if this keys, values and data are already present on my PC ?

Is there a script or program which could take my .reg file as input and then tell me which of this keys, values and data are already present on my PC ?

EDIT: I'm not asking how to compare two .reg files. But I have a .reg file with some keys, values and data and I want to check if this keys, values and data are present in the registry on another PC. I cannot export the same file on another PC and compare because the keys, values and data are not under the same key but are coming from different parts of registry.

  • Export the same section(s) from your PC's registry and compare 2 files using any software. – Akina Jul 17 '18 at 6:28
  • @Akina thanks for your comment, already tried with this method, but not always the most precise one, specially if you have multiple .reg files or one .reg file with multiple keys from different parts of registry exported... – Johan Bernardic Jul 17 '18 at 6:33
  • I usually use Excel - import 1st file to column A and 2nd to column B, remove blank cells and use conditional formatting for coloring differences. If some diff, add cells over against the data present in ajacent column and absent in current. – Akina Jul 17 '18 at 6:35
  • 1
    Look superuser.com/questions/79566/… – Akina Jul 17 '18 at 6:37
  • 1
    In that case the best you can do is, write registry key values you are looking for in your computer and then parse registry file to see if it contains it. – pun Jul 17 '18 at 8:11
1

There isn't a straight way to do this.

But if you are dealing with multiple .reg files (more than 2 or 3) or more than one computer, you could use the approach below.

  1. Read registry Key/Value from your computer into variable or multiple variables using Get-ItemProperty or Get-ItemPropertyValue
  2. Read contents of exported .reg files in another variable using Get-Content
  3. Now you can use PowerShell comparison operators to see if exported .reg files contain Key/Value from your computer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.