Using RegEdit with WinRE

Analysis
Aug 14, 20093 mins

The Trick Is Knowing Which Registry You're Working On!

Some of you may have had occasion to use the Windows Recovery Environment, or Windows RE, or WinRE – for example, when you have a Server 2008 machine that refuses to boot. I ran into just such a situation a week ago when I was installing a USB monitoring tool that totally locked up my system. Apparently the monitoring tool rendered my USB mouse and keyboard unable to communicate with the operating system. Not a good thing! The infamous “Last Known Good Configuration” was (as is so often the case) not helpful, nor was safe mode, and this particular machine didn’t have connectors for PS/2-style mice and keyboards; so I decided to do some Registry surgery. (Examination of the offending software’s installation file revealed that it threw some USB-related entries into some specific Registry locations, and my guess was that if I removed those entries, perhaps my USB ports would come back to life.) The trick is that when you boot to a Server 2008 DVD and choose the Repair option to open a command prompt, when you run RegEdit you’re not looking at the Registry that’s on your C: drive. Instead, you’re looking at the Registry for the WinRE operating system – which is not the part that needs fixing. So what you have to do is highlight one of the major keys, such as HKLM, and choose File > Load Hive. Then navigate to your C: drive (typically you’ll want C:WindowsSystem32Config) and open the Registry “hive” that you want to edit. (You may have to do a bit of trial and error here before you find the correct hive, if you’re unfamiliar with the byzantine architecture of the Registry.) RegEdit will prompt you to give your loaded hive a name – it doesn’t matter what you choose – and then it will appear in RegEdit, where you can go in and edit it. When you’re done editing, you must unload the hive (again, from the File menu) to save your changes to disk. Wouldn’t it have been easier for Microsoft to simply include a RegEdit option to load the entire Registry from the C: drive, for example File > Load Registry from C:, so that you wouldn’t have to hunt for the correct hive? Sure – but remember, this is the least user-friendly tool in Microsoft’s history. They’ve got a reputation to maintain!