Windows – ny way to read system hive files within a booted system

backupwindowswindows-registry

Is there any way to get a copy of %systemroot%\system32\config\system, once the system is up and running? I know the OS puts a lock on this file to keep it from getting trashed, but all I need is to be able to read it, long enough to grab a copy. Perhaps something in the 'native API' would do it?

Best Answer

The reason you're unable to copy that file is not a permission issue, or Windows being "protective" about the file; the problem is, that file is always in use (and therefore locked) on a running system.

When loaded, the file is mapped to HKLM\System; you can use reg.exe to export its contents, both in text and binary format:

reg export HKLM\System system.reg
reg save HKML\System system.hiv

The first one can be opened using any text editor; the latter is a full binary dump, and can be opened by loading it in REGEDIT.

Also, be aware that certain subkeys of HKLM\System are not stored on disk, but are rather populated at runtime by the OS (the most notorious one is CurrentControlSet); so, dumping/saving them might make no sense at all.

Related Topic