Arnout's Eclectica

But I digress…

REGEDIT experiments

12 August 2008 23:11 — Development,Regedit,Windows

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:

Error message when opening level 33

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

A value of type 0x42...

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Copyright © 2006-2009 Arnout Grootveld — Powered by WordPress — Hosted at pair Networks