Windows – Does exporting a registry key in hive binary format preserve permissions and how can I import them to another machine

windows-registry

When I export a key in the registry on my Windows 7 machine, I get the option of .reg or a hive file in binary.

What's the difference?

Does the binary hive file preserve the permissions? Example, I have a key, bfe, and it has various permissions for "nt service\bfe." Will the binary save save that?

How can I import that back in on another computer that has that key but broken?

Thanks.

Best Answer

The textual .reg format does not support WinNT security features; it only preserves the data exported, as you can see by opening the .reg file with a text editor.

The "hive" format is identical to the one used by Windows to store the registry itself. This means that it supports all features used by registry, including security permissions and ownership. You can examine exported "hive" files by using "Load hive" in regedit or reg load in command line, and import into the main registry with reg restore.

However, remember that users on Windows are identified by their SIDs; local accounts will have different SIDs on different machines, so you may still have to adjust the imported permissions manually. (Builtin accounts such as "NT AUTHORITY\SYSTEM" have the same SID everywhere. Domain accounts always have the same SID on every domain member.)

Related Question