The Registry
In the days before Windows 9x, system and application settings were stored in .ini files. With a few applications, the OS could get away with managing a couple .ini files, but can you imagine doing that now? With dozens of applications installed on a given machine and thousands of potential preferences and settings, not to mention multiple users on each machine, the OS would not be able to manage the potentially thousands of settings files.
Enter the registry, a database containing all of those application settings and user preferences stored in a hierarchal structure. Understanding how the registry works – and what you can and can’t do in it – will be crucial to your role as a computer support technician. Since the registry is such an integral part of the Operating System, changing it manually can cause major problems – including a non-booting system.
Likewise, if parts of the registry become corrupt, it can also cause major problems which you will learn more about in the troubleshooting sections of this free tutorial.

Figure 28: The Registry Editor - One Way to Edit the Registry
The Registry is divided into five sections:
1. HKEY_CLASSES_ROOT (HKCR)
2. HKEY_CURRENT_USER (HKCU)
3. HKEY_LOCAL_MACHINE (HKLM)
4. HKEY_USERS (HKU)
5. HKEY_CURRENT_CONFIG (HKCC)
Each of these five sections has a specific purpose for the operation of Windows.
HKEY_CLASSES_ROOT
HKEY_CLASSES_ROOT, sometimes abbreviated HKCR, is really a subkey of HKEY_LOCAL_MACHINE\Software. This key ensures that the proper application opens when you double-click on a file in Windows Explorer. For example, if you open your C: drive and double-click on a .xls file, Windows looks at HKEY_CLASSES_ROOT to see what application .xls files are associated with, finds out that it is Microsoft Excel, and then opens Microsoft Excel to view the file.
HKEY_CURRENT_USER
HKEY_CURRENT_USER contains the root of configuration information for the user who is currently logged on. The information is the settings, user’s folders, configuration options, and user’s profile. This key is frequently abbreviated as “HKCU.”
HKEY_LOCAL_MACHINE
One of the most frequently accessed areas in the registry, HKEY_LOCAL_MACHINE (HKLM) contains the configuration information for the entirely computer – applicable for any user.
HKEY_USERS
HKEY_USERS, sometimes abbreviated HKU, contains the configuration information for each of the user profiles on the machine.
HKEY_CURRENT_CONFIG
Contains information about the hardware profile that is used by the local computer at startup.
Registry Files
Unlike a traditional database, the registry is not stored in just one file. There are several files (and supporting files) which make up a registry. In Windows NT 4, Windows 2000, Windows XP, and Windows Server 2003, the registry files (other than HKEY_CURRENT_USER) are located in Systemroot\System32\Config, for example, on my system that is c:\windows\system32\config. The following files make up the sections of the registry:
|
Registry hive |
Supporting files |
|
HKEY_LOCAL_MACHINE\SAM |
Sam, Sam.log, Sam.sav |
|
HKEY_LOCAL_MACHINE\Security |
Security, Security.log, Security.sav |
|
HKEY_LOCAL_MACHINE\Software |
Software, Software.log, Software.sav |
|
HKEY_LOCAL_MACHINE\System |
System, System.alt, System.log, System.sav |
|
HKEY_CURRENT_CONFIG |
System, System.alt, System.log, System.sav, Ntuser.dat, Ntuser.dat.log |
|
HKEY_USERS\DEFAULT |
Default, Default.log, Default.sav |
Table 2: Registry File Locations, retrieved from http://support.microsoft.com/kb/256986/
The HKEY_CURRENT_USER supporting files are located in the user profiles, often located at C:\WINNT\Profiles\Username\, C:\Documents and Settings\Username\, or C:\Users\Username\ depending on the OS.
Classic Windows: In Windows 98, the registry files are name User.dat and System.dat. In Windows ME, the files are Classes.dat, User.dat, and System.dat.

















Comments