Chapter 30 -- Working with the Registry

[Previous] [Next]

Chapter 30

Just about everything Microsoft Windows 2000 needs to know about your system—your hardware, your software, the order in which your device drivers should be loaded at startup, the resources used by your devices, the hardware profile currently in effect, the user profile currently in effect, and many application-specific settings—is stored in a database called the registry. This centralized information repository essentially replaces the myriad configuration files that had been used in earlier versions of Windows (prior to Windows 95). If you've used earlier versions of Windows, you might have had occasion to examine or modify files named Win.ini and System.ini. These files still exist in Windows 2000 but only to provide compatibility with older (16-bit) applications. For nearly all newer programs, as well as for the operating system itself, the registry has taken over the role once played by Win.ini and System.ini.

The registry has also eliminated the need for many of the "private" .ini files used by some programs. You might still find a handful of .ini files on your hard disk, because older programs still use them—as do newer programs that must maintain compatibility with older versions of the operating system. Windows 2000 itself still uses a few .ini files. But most of the vital stuff that makes your system run is stored in the registry.

Recovering from a Damaged Registry

Windows 2000 saves the current state of the registry every time you start the operating system successfully. If you change the registry and find your system behaving erratically, or if you change it and are subsequently unable to start the operating system, you can revert to the registry as it was the last time you started successfully, as follows:

  1. Restart your computer.
  2. After you see whatever startup messages normally appear but before your computer begins loading Windows 2000, press F8
  3. .

  4. From the menu that appears, choose Last Known Good Configuration, and then press Enter.
  5. If prompted, select the hardware profile you want to use.

You should also restore the last known good configuration after any kind of abnormal shutdown of Windows 2000. If you experience a power interruption, for example, or if someone turns off your machine without going through the normal shutdown procedure, your registry might be left in an abnormal state. If the registry is damaged but you restart successfully, the incorrect state of the registry itself becomes the last known good configuration. Then you lose the opportunity to revert to the undamaged registry. To be safe, always restart with the last known good configuration after an abnormal shutdown.

Although you can make changes to the registry directly, using the Registry Editor program described in this chapter, most of the time you have no need to do so. The normal, safe, and preferred way to alter the registry is by using the Windows user interface, or the user interface of an application program. When you change your wallpaper using Desktop in Control Panel, for example, Control Panel records your change in the registry; you don't have to—and shouldn't—tweak the registry directly. When you change the number of files that appear on a list of recently used files in Microsoft Excel, using the Options dialog box, Excel passes your preference on to the registry. You could accomplish the same task by changing the registry yourself, but it's not a good idea to do it that way.

The reason it's not a good idea is that making the wrong change to the registry can have serious consequences. Making the wrong changes in particular sections of the registry can even make Windows 2000 stop running, possibly forcing you to reinstall the operating system.

Nevertheless, because some useful customizations of your operating system can be made only by direct modification of the registry, it's worth getting to know how the registry is structured and how to use Registry Editor. (We'll look at two such customizations at the end of this chapter. You might read about others in computer trade magazines or on the Internet.) Just be sure that you're alert and know what you're doing any time you have Registry Editor open.

NOTE
Many of the activities described in this chapter require administrative privileges.



Running Microsoft Windows 2000 Professional
Running Microsoft Windows 2000 Professional
ISBN: 1572318384
EAN: 2147483647
Year: 2000
Pages: 317

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net