Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?


share|improve this question
up vote 4 down vote accepted

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.)

share|improve this answer
How can I identify the SID on something such as nt service\bfe? – johnny Jun 1 '12 at 19:22

From Wiki.


The Registry comprises a number of logical sections, or "hives". Hives are generally named by their Windows API definitions, which all begin "HKEY". They are frequently abbreviated to a three- or four-letter short name starting with "HK" (e.g. HKCU and HKLM). Technically, they are predefined handles (with known constant values) to specific keys that are either maintained in memory, or stored in hive files stored in the local filesystem and loaded by the system kernel at boot time and then shared (with various access rights) between all processes running on the local system, or loaded and mapped in all processes started in a user session when the user logs on the system.

How to add a reg key

Just double click on it and it will ask you to confirm the operation and click Ok it will be added in the registry file on OS. Or open the registry editor through run command and click on File> Import and then you can add the .reg or hive file.

enter image description here

enter image description here

Hive files are not accessible directly while you can run the registry file. Hive can be added through only the import option.

enter image description here

When you will try to import a hive it will completely restore the keys under it which you have backed up. While only a single .reg key will affect the only under the hive to that particular place(key) which it belongs.

share|improve this answer
Thanks. What about the security permissions part of things? – johnny Jun 1 '12 at 18:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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