|
|
![]() |
|
|
Performing Surgery on the Windows Registry by Shannon O'Donnell In the early days of Windows, when it was nothing more than an application that ran inside DOS, and was known as Windows 3.0, Windows 3.11, and Windows for Workgroups, all Windows settings were stored in database files, known as "ini" files (for their .ini file extension). When Windows 95, the first "true," self-contained Microsoft GUI operating system, came along, most settings were moved to the Windows Registry. In this article we will take a look at the Registry and see how to manipulate it.
What It Is The Windows Registry, at its heart, is nothing more than a relational database. It is very similar to a Microsoft Access database, or even an OS/400 physical file, in concept. The Registry is made up of primary keys (think of a header file) and secondary keys (think of a detail file), which may also contain many sub-keys (think about taking a vacation). The Registry is the repository for nearly all Windows settings, such as current display size, software licensing information, and the like. In addition, most software vendors write their own unique application data to the Registry for a variety of reasons, including saving your default settings for a given application. When you install a new piece of software, generally one of the last things the installation process will do is install new keys to the Registry. When you uninstall a piece of software, the uninstallation is supposed to remove those Registry keys. But that doesn't always happen. In fact, it rarely happens that all the Registry keys are removed by an application's uninstallation program. What you end up with is a Registry full of orphan keys that may or may not cause you problems later on. Cleaning Up the Registry There are many software products on the market that can help you clean your Registry, and most do a pretty good job of it. But those clean-up programs usually leave a few orphans behind. When that happens, you may need to clean the Registry by hand. I'll show you how to accomplish a manual cleanup. To begin, click the Windows Start button and click the Run menu item. Type the command REGEDIT and click OK. You'll be presented with a screen similar to the one shown in Figure 1.
As you can see, there are five primary keys. When you click the plus (+) sign next to each key, you will see that each of these primary keys is made up of many sub-keys. As you explore these nested keys, you quickly realize that manually searching through the Registry will be a Herculean task. But don't despair. There is an easier way to find items in the Registry. If you are not sure which key you are looking for, which is likely the case when you are trying to clean up a vendor's software and you don't know where it stashed the keys, you can always search the Registry for a given string. Press the Ctrl+F keys while in the Registry to display the Registry Find window. Type the string you want to search for (the vendor or vendor product name might be a good place to start), and click OK. Usually, you can find the Registry keys you are looking for this way. Once a match is found, you can decide if you want to delete that particular key or continue searching. To continue your search, press the F3 key. What If You Can't Delete a Key? Sometimes you are unable to delete a key. Windows won't tell you why, only that you cannot delete a given key. Usually the reason why you can't delete a key is that you are not authorized to it. Even signing on as the administrator on a Windows 2000 or Windows XP system and attempting to delete the Registry key fails. How do you solve this problem? To grant yourself the authority to delete a Registry key, click the Windows Start button, select the Run menu option, and type the command REGEDT32. REGEDT32 is a special Registry editing tool that comes with Windows, which gives you greater control over the Windows Registry. Using REGEDT32, you can search or maneuver to a specific key (of course, not quite in the same manner as you would in REGEDIT; in REGEDT32, you must click View in the menu bar, at the top of the REGEDT32 browser, and select the Find Key menu option), then manually change the permissions for that key. Once you've given yourself authority to the key in question, you can delete it. Caveat Emptor Be careful about deleing Registry keys. If you delete the wrong keys, you could disable Windows! It's a good idea to save the Registry before making any changes to it. There are several ways to save the Registry. If you are on Windows ME or Windows XP, you can take a system snapshot and save the current Windows configuration. That way, if you make an error, you can restore back to a given snapshot. On all versions of Windows, you can "Export" the Registry to a database file from within the REGEDT GUI. Click the Registry Menu item, then click the Export menu item and follow the on-screen prompts.
|
Editors
Contact the Editors |
|
Last Updated: 10/10/02 Copyright © 1996-2008 Guild Companies, Inc. All Rights Reserved. |