REGEDIT experiments
NOTE (2008-08-21): Also see the update to this post.
I've been working on a tool that can export registry information in REGEDIT's .REG
format. Since that format doesn't seem to be fully documented, I spent quite some time experimenting with REGEDIT. Here are some of my more interesting findings (all on W2K3).
No expansion beyond 32 levels
When you expand a key in REGEDIT, it passes the "root" HKEY
(like HKLM
) and the full path to RegOpenKey()
instead of the immediate parent and just the name of the key you're trying to expand. This means that it will run into the "up to 32 levels at a time" limitation of the registry API:
No export beyond 200 levels
Although the registry supports 512 levels of keys, REGEDIT will only export upto a depth of about 200, silently ignoring anything beyond that...
Granted, that's not a very common scenario, but I would expect at least a warning message or something.
Importing values of non-existing types
WinNT.h
defines 12 value types, ranging from REG_NONE
(0) to REG_QWORD
(11). REGEDIT however, will gladly accept all other 32-bit values as well...
[HKEY_CURRENT_USER\RegistryTest]
"Type Test"=hex(42):47,11
results in