X
Tech

Windows 7 registry problem, fixed with Linux

There's been some talk recently regarding fixing Windows problems by using Linux, when Windows utilities fail to work properly. Today I ran into yet another one.
Written by Chris Clay Clay, Contributor

There's been some talk recently regarding fixing Windows problems by using Linux, when Windows utilities fail to work properly. Today I ran into yet another one. This time, with a corrupt Windows 7 registry.

The registry in Windows is a curious beast. Microsoft itself contains hundreds of KB articles that reference how to fix problems by editing the registry. However, there are always disclaimers documented as well, that explain that a system can be severely damaged by editing the registry. So from the start, it is a sensitive item to begin with.

In the case mentioned above, a registry key as part of the .NET Framework 2.0 had apparently become corrupted because it was causing errors in the event log with the .NET Framework service. The initial thought was to remove the offending key from the registry or check its permissions (we verified posts that it is safe to delete), however it could not be found when navigating into the registry with regedit.exe. It simply did not exist as far as regedit.exe was concerned. The Microsoft "sfc" utility was run with "sfc /scannow", however it reported zero errors. We also attempted to install the Windows "User Profile Hive Cleanup Service", however when running the MSI installation file from Microsoft, we got an error about the MSI file being damaged and the installation bombed out. Since there is no other way to obtain this utility (no software mirror sites), that option was out. So, it was time to explore alternatives.

I went to grab my trusty Knoppix Live CD, which I've used countless times to fix Windows problems, usually corrupt NTFS filesystems. However since we were dealing with the registry this time, I had to call on something else called the Offline NT Password & Registry Editor. This handy program can reset NT passwords, and also has a registry editor utility. It is all command-line based, but once we were in it was easy to navigate. In this case, we ended up downloading the ISO for this program and burned to a CD-R. We booted the CD and it loaded the Linux kernel and then into the application itself. We followed through the prompts which detected the Windows partition, and eventually got into the registry editor itself. The registry editor consists of its own shell that is similar to any common Unix/Linux based shell, and allows you to navigate the levels and keys of the registry as if it were a filesystem, with basic "ls" and "cd" commands. Eventually we navigated to the offending key that had been causing the Windows errors, and ran the "dk" command to "delete key", and voila!, the key was gone. Why the Windows-based regedit.exe program failed to see this key and delete it, is a mystery still.

After we rebooted the PC, the errors disappeared from the event log. However, the PC is still having issues with Outlook freezing so I suspect there are deeper levels of registry or other problems. I've posted my thoughts before on why I dislike the Windows registry because it is a central point of failure. Commonly the filesystem itself on the disk is a central point of failure, but in Windows we have two points, the filesystem and also the registry, which of course is stored as files on the filesystem itself. In my opinion, GNU/Linux has more robust ways to store configuration settings for the operating system, directly on the filesystem itself, eliminating one central point of failure.

Editorial standards