You can merge these hives by loading them into a temporary key in the registry itself and copying one hive over the other using the
Considering the nature of the question, please note that I am not liable for any damages that may arise as a result of the use of this answer. See also the Stack Exchange Network Terms of Service.
I actually tested these commands myself on my computer using dummy data, without changing any existing data in the registry, so they should work. I am making the assumption that the registry hive files are supplied to you; if they aren't, you'll probably need to obtain them by booting into a Linux live CD and retrieving the files from computers' hard drives. I couldn't export them on a live system through
reg save on an elevated command prompt, getting little more than
Access is denied errors.
If the hives are supplied as more than one file per computer, and they need to be operated upon as a single unit, you'll need to load and merge them in the registry using the same techniques discussed henceforth, on the keys corresponding to the computer from which the hive files are derived, before copying computer B's complete hives onto computer A's. Otherwise, you can merge each hive individually using the following procedure.
Assume that hive HA is stored in file
Ha.hiv and hive HB is stored in file
Hb.hiv. Begin by creating a key
HKLM\Temp using Registry Editor, then load HA and HB into this temporary key on either computer using these commands in an elevated command prompt:
reg load HKLM\Temp\Ha Ha.hiv
reg load HKLM\Temp\Hb Hb.hiv
Copy the contents of HB into HA, overwriting any existing keys and values:
reg copy HKLM\Temp\Hb HKLM\Temp\Ha /s /f
Unload the registry hive files using Registry Editor by selecting the
Ha key, choosing Unload Hive under the File menu, and repeating the same for
Hb. Then delete the temporary key
reg unload won't work; I tried it myself and got
Access is denied, but I was able to do it through Registry Editor.)
The merged hive HA' is now stored in
For more information on the
reg command, see http://technet.microsoft.com/en-us/library/cc732643.aspx.