What is the function of the registry?
Best answer
Starting from Windows 95, Microsoft introduced the concept of the registry (REGISTRY in English) in Windows (actually this concept already existed in Windows NT) . The registry is the core database of Windows 95 and Windows 98. Various parameters are stored in the table, which directly controls the startup of Windows, the loading of hardware drivers, and the normal operation of some Windows applications. If the registry is damaged due to The cause is damaged, which may cause abnormalities in the Windows startup process, or may cause complete paralysis of the entire Windows system. Therefore, it is very important for Windows users to correctly understand, modify, back up the registry in a timely manner, and restore the registry when there is a problem.
1. Structural division and interrelationship of the registry
The WINDOWS registry has six root keys, which is equivalent to a hard disk divided into six partitions.
Enter RegEdit in the "Run" dialog box, and then click the "OK" button to run the Registry Editor.
The data organization structure of the Windows 98 Chinese version of the registry Registry (System.dat, User.dat, Config.pol).
There are six root keys in the registry. These root keys are all uppercase and prefixed with HKEY_; this command convention is based on the symbol variables of the keywords of the Win32 API's Registry function.
Although in the registry, the six root keys appear to be in a parallel position and have nothing to do with each other. But in fact, the information stored in HKEY_CLASSES_ROOT and HKEY_CURRENT_CONFIG is part of the information stored in HKEY_LOCAL_MACHINE, and the information stored in HKEY_CURRENT_USER is only part of the information stored in HKEY_USERS.
HKEY_LOCAL_MACHINE includes all information in HKEY_CLASSES_ROOT and HKEY_CURRENT_USER. After each system startup, the system maps out the information in HKEY_CURRENT_USER so that users can view and edit the information.
In fact, HKEY_LOCAL_MACHINE\SOFTWARE\Classes is HKEY_CLASSES_ROOT. For the convenience of users to view and edit, the system specifically uses it as a root key. In the same way, HKEY_CURRENT_CONFIG\SY-STEM\Current Control is HKEY_LOCAL_MACHINE\SYSTEM\Current Control.
HKEY_USERS stores the user information of the default user and the currently logged in user. The user information of the currently logged in user is stored in HKEY_CURRENT_USER.
HKEY_DYN_DATA saves dynamic data when the system is running. It reflects the current status of the system, which is different every time it is run, even on the same machine.
Based on the above analysis, the information in the registry can be divided into two categories: HKEY_LOCAL_MACHINE and HKEY_USERS. Please see the following introduction for details of these two categories.
2. The role of the six root keys
In the registry, all data is organized in the form of keys and subkeys through a tree structure, which is very similar to a directory. structure. Each key contains a specific set of information, and the key name of each key is related to the information it contains.
If this key contains subkeys, there will be a "+" symbol to the left of the folder representing this key in the Registry Editor window to indicate that there is more content in this folder. If this folder is opened by the user, then the "+" will become "-".
1.HKEY_USERS
This root key saves the user ID and password list stored in the local computer password list. Each user's provisioning information is stored in the HKEY_USERS root key. HKEY_USERS is one of the root keys accessed in the remote computer.
2.HKEY_CURRENT_USER
This root key contains the currently logged-in user information stored in the local workstation, including the user login username and temporary password (Note: This password is hidden). When a user logs into Windows 98, his or her information is copied from the corresponding entry in HKEY_USERS to HKEY_CURRENT_USER.
3.HKEY_CURRENT_CONFIG
This root key stores data that defines the current user’s desktop configuration (such as monitor, etc.), the last used document list (MRU) and other Windows related information about the current user. 98 Chinese version installation information. Figure 5 shows the connection between HKEY_CURRENT_CONFIG sub-keywords.
4.HKEY_CLASSES_ROOT
According to the extension of the application installed in the Chinese version of Windows 98, this root key indicates the name of its file type.
When the Chinese version of Windows 98 was installed for the first time, the RTF (Rich Text format) file was associated with WordPad amp; 127; but after installing Chinese Word 6.0 in the future, double-clicking a RTF file, Word will be automatically activated. HKEY_CLASSES_ROOT stored in SYSTEM.DAT will replace the settings in the [Extensions] section of the WIN.INI file. It associates applications with file extensions. It also replaces the settings in Windows 3.x Similar settings in the Reg.dat file.
5.HKEY_LOCAL_MACHINE
This root key stores local computer hardware data. The subkeywords under this root key are included in SYSTEM.DAT to provide the information required by HKEY_LOCAL_MACHINE. Or in a set of keys accessible in the remote computer.
Many subkeys in this root key are similar to settings in the System.ini file. Figure 7 shows the situation between the various subkeys under the HKEY_LOCAL_MACHINE root key.
6.HKEY_DYN_DATA
This root key stores dynamic data when the system is running. This data changes every time it is displayed. Therefore, the information under this root key does not Put it in the registry. Figure 8 shows the situation of each subkey under the HKEY_DYN_DATA root key.
3. Important contents of the registry
The registry is a large database Registry. A detailed analysis of this database would take more than one or two pages. I have spent more than half a year analyzing this database structure. Only some important contents are introduced below.
(1)HKEY_CLASS_ROOT
1.HKEY_CLASS_ROOT/Paint.Pricture/DefaultIcon Double-click the default string on the right side of the window and delete the original "key value" in the opened dialog box. Enter 1.
After restarting, open the Windows directory in "My Computer", select "Large Icons", and then the icon of the Bmp file you see is no longer the same MSPAINT icon, but a thumbnail of each Bmp file (provided that Picture viewing software such as ACDSee is not installed).
(2)HKEY_CURRENT_USER
1. Create a new string value name MenuShowDelay=0 in HKEY_CURRENT_USER\Control Panel\Desktop to increase the pop-up speed of the submenu in the "Start" menu.
2. Create a new string value named MinAnimate in HKEY_CURRENT_USER\Control Panel\Deskt-op\WindowsMeterics. A value of 1 starts the animation effect switch window, and a value of 0 cancels the animation effect.
(3) HKEY_LOCAL_MACHINE
1.HKEY_LOCAL_MACHINE\software\microsoft\windows\currentVersion\explorer\user shell folders The path to save personal folders and favorites.
2.HKEY_LOCAL_MACHINE\system\currentControl-Set\control\keyboard Layouts saves the language used by the keyboard and various Chinese input methods.
3.HKEY_LOCAL_MACHINE\software\microsoft\windows\currentVersion\uninstall Saves the uninstallation information of installed Windows applications.
4.HKEY_LOCAL_MACHINE\system\CurrentControl-Set\services\class Save the Control Panel-Add Hardware Device-Device Type directory.
5.HKEY_LOCAL_MACHINE\system\Current-ControlSet\control\update Set the refresh method. A value of 00 sets automatic refresh and 01 sets manual refresh [press F5 in Explorer].
6.HKEY_LOCAL_MACHINE\software\microsoft\win-dows\currentVersion\run saves the name of the program that is set by the control panel to run when the computer starts, and its icon is displayed on the right side of the taskbar. When the program is running in the "Startup" folder, the icon is also on the right side of the taskbar.
7.HKEY_LOCAL_MACHINE\software\microsoft\windows\currentVersion\Policies\Ratings Save the password (data encryption) set in the "Security"\"Grade Review" of the Chinese version of IE4.0. If you forget the password, Deleting the data in Ratings will solve the problem.
8.HKEY_LOCAL_MACHINE\software\microsoft\windows\currentVersion\explorer\desktop\nameSpace saves special icons on the desktop, such as the Recycle Bin, Inbox, MS Network, etc.
(4) HKEY_USERS
1.HKEY_USERS\.Default\software\microsoft\internet explorer\typeURLs saves the URL address list information entered in the address bar of the IE4.0 browser. Will be cleared when clearing the document menu.
2.HKEY_USERS\.Default\so..\mi..\wi..\current-Version\ex..\menuOrder\startMenu retains program menu sorting information.
3.HKEY_USERS\.Default\so..\microsoft\windows\current-Version\explorer\RunMRU saves the program list information running in "Start\Run...". Will be cleared when clearing the document menu.
4.HKEY_USERS\.Default\so..\microsoft\windows\current-Version\explorer\RecentDocs shortcuts for saving the fifteen most recently used documents (deleting them can solve the problem of duplicate document names ), will be cleared when the document menu is cleared.
5.HKEY_USERS\.default\software\microsoft\windows\currentVersion\applets saves the recorded data of Windows applications.
6.HKEY_USERS\.default\software\microsoft\windows\currentVersion\run saves the name of the program that is set by the user to run when the computer starts, and its icon is displayed on the right side of the task bar.
The registry manages various information through keys and subkeys. However, all information in the registry is saved in various forms of key-value item data. In the right pane of the Registry Editor, all key-value item data is saved. These key value item data can be divided into the following three types:
1. String value
In the registry, string values ??are generally used to represent file descriptions, hardware Logo etc. Usually it consists of letters and numbers, and the maximum length cannot exceed 255 characters. As shown in Figure 9, "D:\pwin98\trident" is the key value of the key value "a", which is a string value type. Similarly, "ba" is also the key value of the key value "MRUList". A kind of key-value item data can be formed through the key-value name and key value, which is equivalent to the setting line under the section in the Win.ini and Ssyt-em.ini files. In fact, after using the registry editor to export these key-value item data, its form is exactly the same as the setting line in the INI file.
2. Binary value
In the registry, there is no length limit for binary values ??and can be any number of bytes long. In the registry editor, the binary is displayed in hexadecimal format, as shown in Figure 10. In Figure 10, the key value "80 00 00 00" of the key name Wizard is a binary number. In the "Edit Binary Value" dialog box shown in Figure 11, when you enter a hexadecimal number on the left side of the edit box, the corresponding ASCII code will be displayed on the right side.
3.DWORD value
The DWORD value is a 32-bit (4 bytes, double word) length value. In the Registry Editor, you will find that the system displays the DWORD value in hexadecimal format, as shown in Figure 12. When editing DWORD values, you can choose to enter them in decimal or hexadecimal format.
The commands that can be run are as follows:
winver---------Check the Windows version
wmimgmt.msc----Open windows Management Architecture (WMI)
wupdmgr--------windows update program
wscript--------windows script host settings
write----------WordPad
winmsd---------System Information
wiaacmgr-------Scan Instrument and Camera Wizard
winchat--------XP comes with LAN chat
mem.exe--------Display memory usage
Msconfig.exe---system configuration utility program
mplayer2-------simple widnows media player
mspaint--------painting Board
mstsc----------Remote Desktop Connection
mplayer2-------Media Player
magnify-- ------Magnifying glass utility
mmc------------Open console
mobsync--------Synchronization command
dxdiag---------Check DirectX information
drwtsn32------System doctor
devmgmt.msc--- Device Manager
dfrg.msc-------Disk Defragmenter
diskmgmt.msc---Disk Management Utility
dcomcnfg-- -----Open system component service
ddeshare-------Open DDE*** share settings
dvdplay--------DVD player
net stop messenger-----stop messenger service
net start messenger----start messenger service
notepad------- -Open Notepad
nslookup-------Tool Wizard for Network Management
ntbackup-------System Backup and Restore
narrator-------Screen "narrator"
ntmsmgr.msc----Mobile Storage Manager
ntmsoprq.msc---Mobile Storage Administrator Operation Request
netstat -an----(TC) command to check the interface
syncapp--------Create a briefcase
sysedit-- ------System Configuration Editor
sigverif-------File Signature Verifier
sndrec32-------Audio Recorder
shrpubw--------Create a shared folder
secpol.msc-----Local security policy
syskey------ ---System encryption, once encrypted, it cannot be decrypted, double password to protect Windows XP system
services.msc---Local service settings
Sndvol32------ -Volume control program
sfc.e
xe--------System File Checker
sfc /scannow---windows file protection
tsshutdn-------60-second countdown shutdown command
tourstart------xp introduction (the tour xp program that appears after the installation is completed)
taskmgr--------Task Manager
eventvwr-------Event viewer
eudcedit-------Word creation program
explorer-------Open the resource manager
packager-------Object packaging program
perfmon.msc----Computer performance monitoring program
progman------- -Program Manager
regedit.exe----Registry
rsop.msc-------Group Policy Result Set
regedt32- ------Registry Editor
rononce -p ----Shutdown in 15 seconds
regsvr32 /u *.dll----Stop dll file running
regsvr32 p>
regsvr32 /u zipfldr.dll------Cancel ZIP support
cmd.exe--------CMD command prompt
chkdsk .exe-----Chkdsk disk check
certmgr.msc----Certificate Management Utility
calc-----------Start the calculator
charmap--------Start character mapping table
cliconfg-------SQL SERVER client network utility program
Clipbrd --------Clipboard Viewer
conf-----------Start netmeeting
compmgmt.msc---Computer Management p>
cleanmgr-------garbage cleaning
ciadv.msc------index service program
osk-------- ----Open the on-screen keyboard
odbcad32-------ODBC data source manager
oobe/msoobe /a----Check whether XP is activated
lusrmgr.msc----Local users and groups
logoff---------logout command
iexpress------- Trojan bundled tool, the system comes with it
Nslookup-------IP address detector
fsmgmt.msc-----*** shared folder manager
utilman--------Accessibility Tool Manager
gpedit.msc-----Group Policy
Trackback: /TrackBack.aspx ?PostId=1520144