Complete explanation of the registry

  
        

What is the registry

The Windows Registry is a set of data files that help Windows control hardware, software, user environment and Windows interface. The registry contains two files system.dat and user in the Windows directory. In .dat, there are backups of their system.da0 and user.da0. The registry database can be accessed through the regedit.exe program in the Windows directory. Previously, in earlier versions of Windows (before Win95), these features were implemented by win.ini, system.ini, and other .ini files associated with the application.

In the Windows operating system family, the two files system.ini and win.ini contain all the control functions and application information of the operating system. System.ini manages the computer hardware and win.ini manages the desktop. And the app. All drivers, fonts, settings, and parameters are saved in the .ini file, and any new programs are recorded in the .ini file. These records are referenced in the program code. Because of the size limitations of the win.ini and system.ini files, programmers add auxiliary .INI files to control more applications. For example, Microsoft Excel has an excel.ini file that contains options, settings, default parameters, and other information that is relevant to Excel's normal operation. In system.ini and win.ini, you only need to point out the path and file name of excel.ini.

The evolution of the registry

As far back as Dos and Win3.x, most applications use the ini file (initialization file) to save some configuration information, such as setting the path. , environment variables, etc. System.ini and win.ini control all Windows and application features and access methods, working well in a few users and a small number of applications. As the number and complexity of applications grows larger, you need to add more parameter items to the .ini file. This way, in a changing environment, everyone will change the .ini file after the application is installed on the system. However, no one deletes the relevant settings in the .ini file after deleting the application, so the two files system.ini and win.ini will become larger and larger. Every increase in content can lead to slower system performance. And every time an application is upgraded, there is such a problem: the upgrade will add more parameters but never remove the old settings. And there is an obvious problem, the maximum size of an .ini file is 64KB. In order to solve this problem, the software vendors themselves began to support their own .ini files, and then point to specific ini files such as win.ini and system.ini files. This way multiple .ini files affect the normal access level settings of the system. If an application's .ini file conflicts with the WIN.INI file setting, who is the higher priority?

The registry was originally designed as an application's data file-related reference file, and finally expanded to include all features under the 32-bit operating system and applications. The registry is a set of files that control the appearance of the operating system and how it responds to incoming events. These "events" range from direct access to a hardware device to how the interface responds to specific users to how the application works. The registry is complicated by its purpose and nature. It is designed to work specifically for 32-bit applications, and the file size is limited to approximately 40MB. Utilize a powerful registry database to centrally manage system hardware facilities, software configuration and other information, which facilitates management and enhances system stability. One of the most intuitive examples is why different users under Windows can have their own personalization settings, such as different wallpapers and different desktops. This is achieved through the registry.

As you can see, the Registry is the core of the Windows 9x/Me/NT/2000 operating system, hardware devices, and client applications that are up and running. The database is a huge Tree-stratified database. It records the software that the user installs on the machine and the interrelationship of each program; it contains the hardware configuration of the computer, including the automatically configured plug-and-play devices and the various existing device descriptions, status attributes, and State information and data, etc.

Application of the registry

Second, what do the registry do?

The registry is a data file designed for all 32-bit hardware/drivers and 32-bit applications in Windows NT and Windows 95. The 16-bit driver does not work under Windows NT, so all devices are controlled through the registry, which is generally controlled by the BIOS. Under Win9x, 16-bit drivers will continue to work in real mode mode, they are controlled using system.ini. 16-bit applications will work under NT or Win9x, and their programs will still get information and control with reference to the win.ini and system.ini files.

Without the registry, the operating system does not have the necessary information to run and control the attached devices and applications and respond appropriately to user input.

The registry in the system is a database that records the settings and locations of 32-bit drivers. When the operating system needs to access a hardware device, it uses the driver, and even the device is a BIOS-backed device. Devices without BIOS support must be installed when the driver is installed. This driver is independent of the operating system, but the operating system needs to know where to find them, file name, version number, other settings and information, no registry to device records, they Can't be used.

Examples of registry control user mode are:

★Control Panel Features;

★Desktop Appearance and Icons;

★Network Parameters;

★Browser functionality and features.

Some of these features are user-independent and some are user-specific.

How to call the registry

Enter "regedit" in the Start/Run menu of Windows. You can see the registry through the Registry Editor. What is the registry? Simply Said, it is a tool used to configure the Windows operating system. Through it, you can optimize the operating system and application software, you can set the use rights of windows, can solve the failure caused by improper hardware and network settings. Transform your own operating system.

In the windows 3.X era, the windows are mainly configured by WIN.INI and SYSTEM.INI, but the WIN.INI and SYSTEM.INI files have problems such as low security and limited size. Understand this problem Microsoft has introduced the registry in the later versions of WINDOWS98 to better configure the windows system, which is why we use the registry.

The role of the registry is to save the information needed by the program. When the program needs this information, it is read from the registry. Therefore, the most basic function of the registry is to save information.

When you understand the main function of the registry--after saving the information, let's learn about the saved information, and then learn the role of saving the information!

1, record the installation information;

2, set hardware properties;

3, customize WINDOWS and application software.

The most basic of the registry logic structure is the primary key, subkey, key value and key value . They are managed and organized in groups. The first is the bottom root key. There are several subkeys under each root key. Each subkey can have several (one or more) subkeys under it. There can be one or more key terms and key values ​​under the subkey.

Root key: The lowest level key in the registry, similar to the root directory on disk.

Subkey: The subkey is located under the root key and can be nested in other subkeys. There are several subkeys in the six root keys of the registry, and each subkey can be nested in thousands. Ten thousand child keys.

Copyright © Windows knowledge All Rights Reserved