Windows – How to access Windows Registry from actual real MS-DOS

bootbootable-mediams-doswindows-registry

How to access Windows Registry from DOS?

I need to access registry from DOS, while I boot from DOS bootable disk.
I've searched all the internet, and found only Offline NT Password and Registry Editor, which can not be used in DOS, as I understand.
Also I've found RegView (from many mirrors), which isn't working too (I've tried many instructions).

Is there any easy-in-usage tool, like reg.exe, which is able to load registry hives,
so that I can change registry values?? Or any working instructions ??

Note: I already have a bootable drive, which can read/write to NTFS drives.

Thanks in advance!

Best Answer

The Windows registry was created long after DOS was discontinued. As such, there is no native way to do it, and (not surprisingly) there do not seem to be any DOS programs to do it. Aside from perhaps FreeDOS or ReactOS, it is unlikely that anybody will ever bother to write a Windows registry-editor for DOS.

That said, there is a way you can access and even edit the Windows registry from DOS, but it is not pretty. You would have to use a file-editor (edit.com is not going to cut it) to access the registry hive files directly. For example, to access HKLM\Software, you would open C:\Windows\Config\Software, or to access a user’s hive, you would open C:\Users\<username>\NTUSER.dat. And this is all assuming that the Windows system drive is even FAT32 since DOS cannot access NTFS without a special driver, most of which only allow read-only access.

Like I said, this method is not pretty because you would need to be familiar with the raw file-format of the Windows registry, be wary of entries that are visible in the file but marked as deleted, and be incredibly careful making any modifications because doing it like that is super risky. As such, this method is highly unadvised (even I don’t bother with it, and I like to crack everything open to look inside).

A much easier and safer method is to simply copy the hive files to another Windows system and mount them (e.g., reg load hku\zzz x:\ntuser.dat), do whatever you need to, then unmount them (e.g., reg unload hku\zzz), and copy them back.