I have a .dbreg
file that contains a textual representation of a bunch of registry entries. How do I convert that into a .hiv
file without having to load it into my machine's registry?
I'm kind of creating a package that is run in a sort of fake Windows environment (kind of like Wine), and it wants a bunch of .hiv
files. Merging the text registry entries into an existing .hiv
file that's sitting in some random location (i.e. not the main system one) would also be an option.
The reg
utility doesn't really seem to have a way to work with an arbitrary .hiv
file, aside from the load
, and save
commands, which seem to be just about creating and restoring backups.
There must be a way to do this.
Edit: I had a misconception about what reg load
does. It basically 'mounts' (in Unix parlance) a hive file into the existing registry database at a specific point in the key hierarchy.
Basically, you have to use a trick to create an empty hiv file. This MSDN blog entry contains a PowerShell script that creates an empty regsitry hive file. Then you can use reg load
(which basically 'mounts' a hive file into the existing registry key hierarchy) and reg import
to import the dbreg file into it, then reg unload
.