Import registry entries from a text export

0

I have a copy of my previous registry (Windows 7) saved as Text format (example below) I want to now import this into my current registry (Windows 10).

For Example:

Key Name:          HKEY_CURRENT_USER\Software\Foo
Class Name:        <NO CLASS>
Last Write Time:   11/23/2016 - 2:57 PM

Key Name:          HKEY_CURRENT_USER\Software\Foo\Bar
Class Name:        <NO CLASS>
Last Write Time:   11/23/2016 - 2:57 PM
Value 0
   Name:           MyValue
   Type:           REG_MULTI_SZ
   Data:           blah
...

If I attempt to just "import" this file from regedit (as a normal user) I get:

"The key will be restored on top of key: Foo. All values entries and subkeys of this key will be deleted. Do you want to continue the operation?" [Yes]

"Cannot import c:\foo.txt: Insufficient priviledges."

I'm assuming this is because it is not in an expected .reg file format and without manually adding these, or scripting something to parse the txt file to a .reg file I won't be able to import the values. Is there a straight-forward way to do this?

busfault

Posted 2019-04-05T14:29:16.277

Reputation: 111

2"Insufficient priviledges" indicates something unrelated to the file format. You likely need to run RegEdit as an administrator in order to have adequate permissions to overwrite that data. That being said, when I try to import a text file, formatted as your file is, I get "The specified file is not a registry file. You can import only registry files". So you might still have a format problem. (My test was on Windows 7 -- Windows 10 might allow importing text files. I'll try to find a Windows 10 machine to test that on.) – Doug Deden – 2019-04-05T14:45:36.453

2Unfortunately, you need to make a script converting this text format into .reg format – Sergey Nudnov – 2019-04-05T15:02:18.930

No answers