An introduction to the Registry DataBase

Registry Database ? What is that ? - Windows 95/98/ME and User.dat
Config.pol - Modifying the registry - Reboot ?

 
Top Registry DataBase ? What is that ?
The Registry DataBase is a hierarchical database used by the system to store data about the computer, the devices, the programs and the user's preferences. Although you can see it as one single entity when you open it with RegEdit, It is made of different files :
 
System : 95, 98 - Files are in %WinDir% and have the attributes +r +s +h
  Files Keys Content
1. System.dat HKCR + HKLM Hardware and software system parameters.
2. User.dat HKU Software user parameters and customization user paramaters. If more than 1 profiles have been created, each user will have his User.dat file in %WinDir% \Profiles \%UserName% or on a server and both User.dat files will be loaded at startup.
 
System : ME - Files are in %WinDir% and have the attributes +r +s +h
  Files Keys Content
1. System.dat HKLM Like 95/98 except for HKCR.
2. User.dat HKU Like 95/98.
3. Classes.dat HKCR Program associations, context menus, file types.
 
System : NT, 2K - Files are in %SystemRoot% \System32 \Config and have the attributes +r +s +h
  Files Keys Content
1. Default HKU\.DEFAULT Default profile
2. Sam HKLM\SAM User accounts and passwords
3. Security HKLM\SECURITY Control access list
4. Software HKLM\SOFTWARE Installed software
5. System HKLM\SYSTEM Hardware configuration
6. Ntuser.dat HKU\{SID} Active profile
7. Userdiff To import a profile generated with a previous version of Windows
 
The HKLM\HARDWARE subkey and the HKDD key are never written to disk because they are dynamically created in RAM at startup. See the Backup section for more information.
 
Top Windows 95/98/ME and User.dat
Here is how Windows 95/98/ME determines from which folder it will load User.dat :
%WinDir% : Windows always loads User.dat from that folder and uses it for default users, even if profiles are enabled.
%WinDir%\Profiles\UserName : Windows loads User.dat from that folder if profiles are enabled and if the system can not find a more recent User.dat file in the user's welcome folder.
\\Server\Home ou \\Server\Mailfolder : Windows loads User.dat from the network server if the user has a welcome folder containing a profile more recent than the files located in %WinDir% \Profiles \UserName.
 
Top Config.pol
Another file which is not part of the registry will be used if policies have been defined on your machine. Policies are limitations, interdictions concerning some actions in Windows. That file is called Config.pol. It is located on a server on a network or in local %WinDir%. The parameters of Policy.pol override the parameters in the registry. Here is how Windows determines from which folder it will load Config.pol :
On a local drive, Windows looks for Config.pol in %WinDir%.
The Microsoft Networks client looks for Config.pol in \\Server\Netlogon.
The Netware Networks client looks for Config.pol in SYS:PUBLIC.
 
Top Modifying the registry
The registry database is constantly being modified by the system and the visible or invisible applications which are running on your computer.  
You can also edit the registry with : 
1. Object Properties 5. Explorer
2. The Control Panel 6. TweakUI and PowerToys
3. The Policy Editor 7. Windows APIs
4. NT's Diagnosis Tool 8. Many tools downloadable from the net
The registry can also be modified with .reg and .inf files or with the registry editing tools included in Windows : 
95, 98, ME : RegEdit.exe.
NT, 2K : RegEdit.exe or RegEdt32.exe which enables defining access rights on keys.
Tips
1. If you can not find an entry in the registry, just create it. Most entries have a default value even if not explicitly specified in the registry.
2. In order to modify the registry without confirmation message, use Regedit.exe /s File.reg. The /s switch stands for Silent mode.
 
Top Reboot ?
If you add or modify an entry, it may prove necessary to reboot for your change to be effective. Some changes will immediately take effect, provided you refresh the display with F5. Others may work by just soft-rebooting Windows. To do so :
95, 98 Press Shift when clicking OK to reboot. Does not work in ME.
NT, 2K Log off and relog on.
That is why, if you are not sure whether a change works or not : 
1. Click on the Desktop, hit F5 and test your modification.
2. If it does not work, soft-reboot (see above).
3. If it still does not work, reboot.

 

© Franck Kiechel 2000-2001