The Windows Registry

by Jeremy Reis on Tuesday, January 22, 2008

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.

Page 32 of 40

Comments

 Rate This Post:    Rate This Comment as Good Rate This Comment as Bad
Informative
Thanks for the info! It's on to the next section! I needed the refresher!
254 out of 459 people found this comment informative.
 Rate This Post:    Rate This Comment as Good Rate This Comment as Bad
Accessibility
Thanks for this first section but why are the other sections unaccessible?
200 out of 377 people found this comment informative.
 Rate This Post:    Rate This Comment as Good Rate This Comment as Bad
very good assignment
very good for learning
179 out of 347 people found this comment informative.
 Rate This Post:    Rate This Comment as Good Rate This Comment as Bad
Other Sections?
Thanks for 1st section. How about other sections?
160 out of 327 people found this comment informative.
 Rate This Post:    Rate This Comment as Good Rate This Comment as Bad
Section 2 is Posted
Section two is now posted for you to enjoy!
176 out of 334 people found this comment informative.
 Rate This Post:    Rate This Comment as Good Rate This Comment as Bad
To bulky
the article is usefull but subtitles on this page are  too many
56 out of 117 people found this comment informative.
 Rate This Post:    Rate This Comment as Good Rate This Comment as Bad
rest of sections
is there any chance of rest of sections
39 out of 65 people found this comment informative.
 Rate This Post:    Rate This Comment as Good Rate This Comment as Bad
hardware training
i will like this subject as well as i am learning this
6 out of 12 people found this comment informative.
 Rate This Post:    Rate This Comment as Good Rate This Comment as Bad
i will enjoyed ..that lesson....truely wounderful...i extremely like
7 out of 13 people found this comment informative.
 Rate This Post:    Rate This Comment as Good Rate This Comment as Bad
Great tutorial! Where are Sections 4-8?
I love this! So much more informative than the yawn-inducing COMP-TIA book by Michael Myers.
5 out of 13 people found this comment informative.

Add a Comment to This Article

Anonymous (Please Login to Post With Your Account)

      
HTML not permitted, some code allowed in [brackets]:
[b]bold[/b] , [i]italicized[/i], [br] line break, other formatting...


Code Image - Please contact webmaster if you have problems seeing this image code Load New Code
Please enter the code above
 
Please submit your comment only once, some comments may be reviewed by moderators
That Network: Interactive Internet Publishing Network DefineThat.com: free technical definitions define wordsExamPractice.com: free certification news and practice exams   Explorestartups.com: find free business plans and business ideas   GiveThat.com: free gift ideas, birthday, Christmas, holidays  helpthat: got questions, we got answers   Jerm.com: entrepreneurship blog   learnthat.com: free software tutorials  mytutorials.com: collaborative write your own tutorials  Publishondemand.net: free publish on demand print on demand pod comparison   Romancetips.com: free romantic tips, advice, dating, date ideas, free romance   seekthat: free technical search engine   selfpublishthat: publish on demand   startupwatch: profiles of new companies   thatgear.com: gadget and electronic reviews   tutorialguru.com: free tutorials