The Registry: Basics
When you change the desktop wallpaper using Control Panel's Display icon, the next time you start your computer, how does Windows 98 know which wallpaper you selected? If you change your video display driver, how does Windows 98 know to use that driver at startup and not the original driver loaded during Setup? In other words, how does Windows 98 "remember" the various settings and options either that you've selected yourself or that are appropriate for your system? The secret to Windows 98's prodigious memory is the Registry. The Registry is a central repository Windows 98 uses to store anything and everything that applies to the configuration of your system. This includes hardware settings, object properties, operating system settings, and application options. It's all stored in one central location, and, thanks to a handy tool called the Registry Editor, it's yours to play with (carefully!) as you see fit.
A Brief History of Configuration Files
It wasn't always this way. In the early days of DOS and Windows (version 1!), system data was stored in two humble files: CONFIG.SYS and AUTOEXEC.BAT, those famous (or infamous) Bobbsey twins of configuration files. When Windows 2.0 was born (to little or no acclaim), so too were born another couple of configuration files: WIN.INI and SYSTEM.INI. These so-called initialization files were also simple text files. It was WIN.INI's job to store configuration data about Windows and about Windows applications; for SYSTEM.INI, life consisted of storing data about hardware and system settings. Not to be outdone, applications started creating their own INI files to store user settings and program options. Before long, the Windows directory was festooned with dozens of these INI garlands.
The air became positively thick with INI files when Windows 3.0 rocked the PC world. Not only did Windows use WIN.INI and SYSTEM.INI to store configuration tidbits, but it also created new INIs for Program Manager (PROGMAN.INI), File Manager (WINFILE.INI), Control Panel (CONTROL.INI), and more.
It wasn't until Windows 3.1 hit the shelves that the Registry saw the light of day, albeit in a decidedly different guise from its Windows 98 descendant. The Windows 3.1 Registry was a database used to store registration information related to OLE (object linking and embedding) applications.
Finally, Windows for Workgroups muddied the configuration file waters even further by adding a few new network-related configuration files, including PROTOCOL.INI.
The Registry Puts an End to INI Chaos
This INI inundation led to all kinds of woes for users and system administrators alike. Because they were just text files in the main Windows directory, INIs were accidents waiting for a place to happen. Like sitting ducks, they were ripe for being picked off by an accidental press of the Delete key from a novice's fumbling fingers. There were so many of the darn things than few people could keep straight which INI file contained which settings. There was no mechanism to help you find the setting you needed in a large INI file. And the linear, headings-and-settings structure made it difficult to maintain complex configurations.
To solve all these problems, the Windows 95 designers decided to give the old Windows 3.1 Registry a promotion, so to speak. Specifically, they set it up as the central database for all system and application settings. The Registry maintains this structure in Windows 98.
Here are some of the advantages you get with this revised Registry:
That's not to say that the Registry is a perfect solution. Many of its settings are totally obscure, it uses a structure that only a true geek could love, and finding the setting you need is often an exercise in guesswork. Still, most of these problems can be overcome with a bit of practice and familiarity, which is what this chapter is all about.
Your Old Configuration Files Still Work
Although the Registry appropriates the function of all those old initialization and startup files, it doesn't shoulder the entire configuration file burden by itself. Windows 98 still recognizes and works with the settings in WIN.INI and SYSTEM.INI to maintain compatibility with 16-bit applications that are hard-wired to use these files for configuration data. Also, you still need CONFIG.SYS and AUTOEXEC.BAT if you have hardware that requires real-mode drivers or software that requires specific DOS settings (such as an environment variable or the PATH statement). Of course, 16-bit programs can still use their private INI files.