I'll teach you how to learn. Registry Basics _ Registration Form

Source: Internet
Author: User

Note: This article and future series of articles are described in the Windows XP registry as an example (same as the Windows.NET Server registry).
  

  1.1 The concept of the Registry

The registry of Windows is essentially a large database that stores various configuration information for computer hardware and software with several aspects of its content:

    • Software and hardware for configuration and status information, application and Resource Manager Shell initial conditions, preferences, and unload data.

    • Computer-wide system settings and various licenses, file extensions associated with applications, hardware descriptions, status, and attributes.

    • Computer performance records and the underlying system state information, as well as various other data.


  1.2 The difference between the registry and the earlier INI file

In earlier Windows operating systems (such as Windows 3.x), the hardware and software working environment was configured with two files with an ini extension (System.ini and Win.ini). Where the System.ini control software, while the Win.ini controls the desktop and the application. The disadvantage of the INI file is that the size is limited to 64KB, but as the operating system becomes more powerful and the application is growing, new INI files have to be added to control the application. This makes the INI file bulky, operating system operation speed down, management and maintenance is also not convenient. Moreover, the INI file is easily edited by the text editor, and the editing process is easy to make mistakes, which makes the system more fragile. In addition, the INI file is stored only on this computer, and it is almost impossible to make remote access over the network.

In order to improve the above, in Win 95 and its later version, the method of using Registry management configuration information, the main difference from the INI file is as follows:

    • The registry uses binary forms to store data.

    • The registry supports primary keys, and all levels of subkeys have their own "key value entries."

    • Key values in the registry are more than simple strings and contain executable code.

    • On the same computer, the registry allows you to store attributes for multiple users.

  1.3 The function of the registry

In the Windows XP operating system, the registry acts as a database for all settings and storage of drivers, closely related to Windows XP systems and drivers, and plays the role of the operating system and driver connectors.

When the operating system accesses a hardware device, Windows XP will install the appropriate driver into the system for the device that is being reported to the BIOS setup program. These drivers are independent of the operating system, and the operating system requires only their location, filename, and version number, all of which are stored in the registry's Heky_local_machinehardware.

At the same time, the registry also bear the operating system and application software connectors. When an application is installed, the installer writes the associated run settings to the registry. When the application is running, read the required setup data from the registry to find the program or dynamic connection library that you want.

We can customize the personalized desktop by modifying the registry; Manually modify some of the hardware and software parameters without restarting the system, and by removing the spam information in the registry, you can increase the speed of your computer and restore the damaged registry to resolve system failures and errors; The registry can check the system's configuration and settings online. Implement remote Management system.

  

  1.4Windows XP registry file location and composition

The data files for the Winndows XP registry are in the C:\Windows\System32\config folder, respectively, the default, SAM, security, SYSTEM, software, and Userdiff. As shown in the figure:

The way to open Registry Editor is to click [Start]| [Run], enter "regedit" or "regedt32" on the command line, point [OK] or enter.

The structure of the registry consists of a root key, a primary key, a subkey, and a key value entry. As shown in the figure, the root key is a string that starts with "hkey" as the prefix in the left window of the Registry Editor. Because it is at the top of the registry and is called the root key, the Windows XP registry includes five large root keys, all stored under My computer in the root directory, HKEY_ Classes_root, HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE, HKEY_USERS and Hkey_current_config.

A primary key is the key that is closest to the root key under the root key, and the primary key usually includes one or more subkeys or value entries. Include 14 primary keys in the HKEY_CURRENT_USER in the figure.

A subkey (sub key) is a key that is contained under a primary key, and its name is relative to the primary key. Each primary key typically contains a number of subkeys, such as a primary key appevents containing two subkeys below.

A key Value entry (value entry) is a variety of information that appears to the right of the Registry Editor, as shown in the figure, where each key value entry includes the name, type, and data three parts. The name of a key-value entry can consist of any character, number, and representation of a space, but it cannot be used with a backslash. Key value entries for different root keys, primary keys, and subkeys can have the same name, but key value entries in the same key cannot have the same name. A key value entry defines the value of the key value item, and its data can occupy a maximum of 64KB of space. The data type of the value can be a string, binary value, DWORD (double-byte) value, and so on.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.