First of all, do you really really mean DOS, or the command prompt?
There is a tool that will look into a registry hive file that's not curently
in use from within Windows (GUI).
Go to www.mitec.d2.cz and look for Windows Registry File Viewer (currently
v1.2). It doesn't have source code with that application, but at least it
gives you a starting point.