First, the origin of the registry
A feature of PC and its operating system is that it allows users to configure the hardware and software of computer system in various ways according to their own requirements. In early graphical operating systems, such as Win3.x, the configuration of software and hardware working environment was completed by modifying files with extension. INI, but the management of INI file is very inconvenient, because each device or application has its own ini file, so it is difficult to achieve remote access on the network.
In order to overcome these problems, in Windows 95 and its subsequent versions, a database called "Registry" is adopted for unified management, which centralizes all kinds of information resources and stores all kinds of configuration information. According to this principle, a registry containing all configuration information of application programs and computer systems is adopted in all versions of Windows to manage the association between application programs and files, the description of hardware devices, status attributes and various status information and data.
Unlike the INI file:
1. Registry logs in data in binary form;
2. The registry supports subitems, and subitems at all levels have their own "key values";
3. Entries in the registry can contain executable code instead of simple strings;
4. On the same computer, the registry can store the characteristics of multiple users.
The characteristics of the registration center are:
The 1. registry allows you to track the configuration of hardware, system parameters, applications and device drivers, which allows you to modify some settings without restarting.
2. The hardware data registered in the registry can support the plug-and-play function of a higher version of Windows. When Windows detects a new device on the machine, it will save the relevant data in the registry. In addition, the resource conflict between the new equipment and the original equipment can be avoided.
3. Managers and users can view the configuration and settings of the system on the network through the registration form, so as to realize remote management.
Second, use the registry.
1. You can enter regedit in Run on the Start menu.
2. You can also enter regedit in DOS.
Third, the registry root key description
Hkey_classes_root contains all registered OLE information and document types, which are copied from HKEY _ local _ machine \ software \ classes.
Hkey_current_user contains the logged-in user configuration information, which is copied from hkey_users\ current user subtree.
Hkey_local_machine contains the configuration information of this machine. Wherein the configuration subtree displays printer information; Enumeration subtree is plug-and-play device information; The system subtree is the control set of device drivers and service parameters; Software subtrees are application-specific settings.
Hkey_users All login user information.
Hkey_current_config contains some software and hardware configurations that users often change, such as font settings, display types, printer settings, etc. Is copied from hkey_local_machine\config.
Hkey_dyn_data contains system information stored in computer memory.
Four. Details of the registration form
HKEY _ Local _ Machine \ Software \ Microsoft \ Windows \ Current Version \ Explorer \ User Shell Folder saves the path of personal folders and favorites.
HKEY _ local _ machine \ system \ currentcontrolset \ control \ keyboardlayouts saves the languages used by keyboards and various Chinese input methods.
HKEY _ User \. Default \ software \ Microsoft \ Internet Explorer \ Type URLs saves the URL address list information entered in the address bar of IE browser. When the document menu is cleared, it will be emptied.
HKEY _ User \. The default \ so ... \ mi ... \ wi ... \ Current version \ ex ... \ Menu order \ Start menu retains the program menu sorting information.
HKEY _ User \. The default \ so ... \ Microsoft \ Windows \ currentversion \ Explorer \ Runmru saves the list information of programs running in "Start * Run ...". When the document menu is cleared, it will be emptied.
HKEY _ User \. By default, \ so ... \ Microsoft \ Windows \ currentversion \ Explorer \ ecentdocs saves shortcuts to fifteen recently used documents (deleting them can solve the problem of duplicate document names), which will be cleared when the document menu is cleared.
HKEY _ Local _ Machine \ Software \ Microsoft \ Windows \ Current Version \ Uninstall Save the information of uninstalling the installed Windows application.
HKEY _ User \. Default \ software \ Microsoft \ Windows \ CurrentVersion \ Applets saves the recorded data of Windows applications.
HKEY _ Local _ Machine \ System \ Current Control Set \ Service \ classSave Save Control Panel-Add Hardware Device-Device Type Directory.
HKEY _ Local _ Machine \ System \ Current Control Settings \ Control \ Update Immediate Refresh Settings. The value 00 is set to automatic refresh, and 0 1 is set to manual refresh [press F5 to refresh in Explorer].
HKEY _ Current _ User \ Control Panel \ Desktop Creating a new string name MenuShowDelay=0 can improve the pop-up speed of the submenu in the start menu. Create a new string name MinAnimate with a value of 1 to start the animation effect switching window, and a value of 0 to cancel the animation effect.
HKEY _ local _ machine \ software \ Microsoft \ Windows \ currentversion \ run saves the name of the program that runs when the computer is started set by the control panel, and its icon is displayed on the right side of the taskbar. [The icon for launching the folder program when it is running is also on the right side of the taskbar]
HKEY _ User \. Default \ software \ Microsoft \ Windows \ currentversion \ run saves the name of the program that runs when the computer is started, and its icon is displayed on the right side of the taskbar.
HKEY _ class _ root/paint.p picture/defaulticon icon for the default picture. Double-click the string on the right side of the window, delete the original key value in the opened dialog box, and enter% 1. After restarting, open the Windows directory in My Computer and select "Big Icon". Then the icon of the Bmp file you see is no longer the same sketchpad icon, but the thumbnail of each Bmp file.
HKEY-local-machine \ software \ Microsoft \ Windows \ CurrentVersion \ Policies \ Ratings saves the password (data encryption) set in the Chinese version of "Security" grading review in IE4.0.
HKEY-local-machine \ software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ Desktop \ namespace saves special icons on the desktop, such as recycle bin, inbox, MS network, etc.
5. How to back up the registry?
Use Registry Editor to manually back up the registry.
Registry Editor (Regedit) is a registry tool attached to the operating system, through which various modifications can be made to the registry. Of course, "backing up" and "restoring" the registry is naturally its instinct.
(1) Back up the registry through the Registry Editor.
Because modifying the registry sometimes endangers the security of the system, whether it is WINDOWS 98 or WINDOWS 2000 or even WINDOWS XP, the registry editor is "hidden" in a very hidden place. If you want to "please" it out of the mountain, you must use special means. Click "Start" menu, select "Run" option on the menu, enter "Regedit" in the pop-up "Run" window, and click "OK" button to start the registry editor.
Click the Registry menu of Registry Editor, click the option of Export Registry File, enter the file name "regedit" in the pop-up dialog box, select the Save Type as Registry File, then set the Export Range to All, then select the file storage location, and finally click the Save button to save the system registry to the hard disk.
After completing the above steps, find the folder where you just saved the backup file, and you will find that the backup file has been placed in the folder.
(2) Back up the registry under DOS.
WINDOWS (including Safe Mode) cannot enter when the registry is damaged. What should I do at this time? Backing up and restoring the registry in a pure DOS environment is another remedy. Let's take a look at how to back up and restore the registry in DOS environment.
Backing up and restoring the registry through the registry editor in pure DOS, as explained earlier, using the registry editor to back up and restore the registry in WINDOWS environment. In fact, the registry editor "Regedit.exe" can not only run in WINDOWS environment, but also be used in DOS.
Although the function of registry editor in DOS environment is not as powerful as that in WINDOWS environment, it also has its uniqueness. For example, you can back up the registry in WINDOWS through the Registry Editor, but you can't enter WINDOWS after the system has problems. At this point, you can restore the registry through the registry editor in pure DOS.
It should be said that it is rare to back up the registry in DOS environment. Generally, it is enough to back up in WINDOWS, but in some special cases, this method is very practical.
After entering DOS, enter the WINDOWS directory of drive C, enter "regedit" at the prompt of the directory and press enter to view the usage parameters of "regedit".
Backing up the registry through "Regedit" still needs two files "system.dat" and "user.dat". The specific command format of this program is as follows:
regedit/L:system/R:user/E filename . reg Regpath
Parameter meaning:
/l: system specifies the path where the System.dat file is located.
/r: user specifies the path where the User.dat file is located.
/E: This parameter specifies that the registry editor should export the registry. Leave a space after this parameter and enter the file name of the exported registry.
Regpath: Used to specify which registry branch to export. If not specified, all registry branches will be exported. Among these parameters, "/l: system" and "/r: user" are optional. If these two parameters are not used, the registry editor thinks that the files "system.dat" and "user.dat" in the WINDOWS directory are running. If you boot into DOS from floppy disk, you must specify the specific paths of "system.dat" and "user.dat" files with "/L" and "/R" parameters, otherwise the registry editor will not find them.
For example, when you enter DOS through the startup disk, the command to back up the registry is "regedit/L: C: \ WINDOWS \/R: C: \ Windows \/e regedit. reg", which means to back up the entire registry to the Windows directory with the file name "regedit.reg". However, if you enter the command "regedit /E D:\Regedit.reg", it means backing up the entire registry to the root directory of disk D (omitting the "/L" and "/R" parameters), and its file name is "Regedit.reg".
(3) Back up the registry with the Registry Checker.
Scanreg.exe, a registry checker in DOS environment, can be used to back up the registry.
The command format is:
Scan/Backup/Restore/Comment
Parameter interpretation:
/backup is used to back up the registry immediately.
/restore displays all backup files according to the time and date of backup.
/comment displays the part of /restore related to the backup file.
Note: When displaying the backup registry file, the compressed backup file is listed as a. CAB file, and the word after the CAB file is Started or NotStarted. Started means that the file can successfully start Windows, and not Started means that the file has not been used to start Windows, so it is not yet known whether it is a good backup.
For example, if we want to view all backup files and backup-related parts, the command is as follows: Scanreg /restore /comment.
Six, the use of skills
These are all conceptual things. Let's do it in practice.
1. Accelerate startup and shutdown.
At [start] # > [Run] # > Type [regedit] # > [HKEY current user] # > [Control Panel] # > [Desktop], change the numerical data of the string value [HungAppTimeout] to [200], and change the numerical data of the string value [WaitToKillAppTimeout] to 1000. In addition, in [HKEY _ local _ machine] # >; [system] # > [Current Control Set] # > [Control], change the numerical data of the string value [HungAppTimeout] to [200], and change the numerical data of the string value [waittokilservicetimeout] to 1000.
2. Automatically close the stop response program.
At [start] # > [Run] # > Type [regedit] # > [HKEY current user] # > [Control Panel] # > [Desktop], change the numeric data of the string value [AutoEndTasks] to 1, and then restart.
3. Clear the unused DLL files in the memory.
At [start] # > [Run] # > Type [regedit] # > [HKKEY _ LOCAL _ MACHINE]# & gt; [Software] # > [Microsoft] # > [Windows]# & gt; [CurrentVersion], add an item [AlwaysUnloadDLL] in [Explorer], and the default value is set to 1. Note: If the default value is set to [0], this function will be disabled.
4. Speed up the menu display
At [start] # > [Run] # > Type [regedit] # > [HKEY current user] # > [Control Panel] # > [Desktop], change the numeric data of the string value [MenuShowDelay] to [0]. If the menu display speed is too fast to adapt after adjustment, please change the value of [MenuShowDelay] to [200] and restart.
5. It is forbidden to modify the user folder.
Find HKEY current user software Microsoft Windows current version policy explorer. If you want to lock the physical locations of user folders such as My Pictures, My Documents, Favorites and My Music, please set the following keys to1:DisableTypePicturesdirchange, DisablePersonalDirChange, DisableFavoritesDirChange and DisableMyMusicDirChange respectively.
6. Reduce the delay time of browsing LAN.
Like Windows 2000, XP has an annoying delay problem when browsing LAN, but it is difficult to find information about this problem. For example, if you browse a Win 9x machine and type "\computername" in the address bar of the online neighbor, the XP machine will check the "task plan" on the machine it is connected to. This search process may cause a delay of up to 30 seconds. If you directly open the * * * resource, for example, enter "\computernameshare" in the address bar of the online neighbor, there will be no such delay. In order to avoid searching for "task plan" in XP and improve the speed of browsing the network, you can delete the subitem {d6277990-4c6a-1cf-8d87-00aa0060f5bf}. The type of the key is REG_SZ.
7. Shielding hotkeys in the system
Click Start → Run to enter Regedit and open the Registry Editor. Then open it to HKEY _ Current _ User \ Software \ Microsoft \ Windows \ Current Version \ Policies \ Explorer in turn, and create a new double-byte value with the key name "NoWindows Keys" and the key value "1", so that users can be prohibited from executing some prohibited commands by using system hotkeys. If you want to restore, just set the key value to 0 or delete the key.
8. Turn off the unused * * * enjoyment
Security has always been a concern of everyone. In order to ensure the security of your own system, you should turn off some unnecessary enjoyment. Edit the registry file with Notepad, save it as a. reg file with any name, and double-click it when using it to close those unnecessary * * * enjoyment:
Windows registry editor version 5.00
[HKEY _ LOCAL _ MACHINE \ SYSTEM \ current control set \ Services \ lanman server \ parameters]
" AutoShareServer " = dword:00000000
" AutoSharewks"=dword:00000000
[HKEY _ LOCAL _ MACHINE \ SYSTEM \ current Control set \ Control \ Lsa]
" restrict anonymous " = dword:0000000 1
9. Let IE support multithreaded download.
In general, everyone downloads files with multi-thread download software such as Flashget. In fact, IE can also support multi-thread downloading, but Microsoft hides this function. We'll dig it up for use. Open the registry editor, and create a new double-byte value item "MaxConnectionsPerServer" under the registry HKEY _ Current _ User \ Software \ Microsoft \ Windows \ Current Version \ Internet settings, which determines the maximum number of simultaneous downloads. Generally, it is better to set it to 5-8 connections. In addition, for the HTTP 1.0 server, a two-byte value item named "Maximum number of connections per 1 _ 0 server" can be added, which is also used to set the maximum number of simultaneous downloads, and can also be set to 5 ~ 8.
10. Let WINDOWS XP log in automatically.
Open: HKEY _ local _ machine \ software \ Microsoft \ Windows NT \ current version \ Winlogon, create a new string "autoad password" in the right window, set their key values to "1", set the value of "default user name" to user name, and create a new string with the value of "default password".
Seventh, make our system slim.
Delete the redundant virtual cd icon.
When we install a virtual optical drive in the system, there will be an extra CD icon in my computer. Even if you don't use the virtual CD-ROM in the future, the virtual CD-ROM icon will remain, which is really unnecessary. Let's delete this redundant virtual CD-ROM icon: click Start → Run, enter "regedit", press the "OK" key, open the Registry Editor, and expand HKEY_LOCAL_MACHINE\Enum\SCSI branch in turn. There are usually two subitems under SCSI subitem, which correspond to virtual CD-ROM drive and physical CD-ROM drive respectively. Delete all subitems under SCSI, and then restart the computer and the virtual CD-ROM icon.
Delete redundant system-level icons
System-level icons refer to icons automatically created by the system when Windows is installed, such as recycle bin, inbox, online neighbors, etc. Some of these icons are useless to users, but they cannot be deleted directly. Open Registry Editor and expand HKEY _ Local _ Machine \ Software \ Microsoft \ Windows \ Current Version \
Explorer\Desktop\NameSpace branch, and then delete unnecessary subitems. After closing the Registry Editor and restarting the computer, you will find that unnecessary system-level icons on the desktop have disappeared.
Delete the redundant options in operation.
If you use the "Start → Run" menu many times, you will find that its "Open" window is messed up by many unnecessary commands. Open Registry Editor and expand HKEY users. Default \ Software \ Microsoft \ Windows \ Current version.
\Explorer\RunMRU branch, just delete the relevant key values of the right window.
Delete the redundant options in the search.
Expand HKEY _ Users \. Default \ Software \ Microsoft \ windows \ Current version.
\ Explorer \ Doc-Find Specimru branch, and delete the relevant key values in the right window.
Delete redundant keyboard layouts
Windows tries to be the darling of the world, so its keyboard layout is suitable for the use habits of all kinds of people in various countries. Open the Registry Editor and expand HKEY _ Local _ Machine \ System \ Current Control Set \ Control.
\KeyboardLayouts branch, we can see that Spanish (traditional), Danish, German (standard) and other keyboard layouts are saved under this branch. If you can't use the keyboard layout of these languages, you can delete these subitems directly.
Delete redundant regional settings
Similar to the keyboard layout above, there are regional settings of Windows. In the Registry Editor, expand HKEY _ Local _ Machine \ System \ Current Control Set \ Control.
\Nls\Locale branch, users in simplified Chinese can keep only the key value "00000804", and others can be ruthlessly deleted.
Eight, advanced articles
1. Automatically clears the user name of the last visitor in the login window.
Usually, users must enter their own user name and password to enter the WINNT network. However, when you restart your computer and log in to WINNT, WINNT will automatically display the user name of the last visitor in the "User Name" text box in the login window by default. In this way, some illegal users may use their existing user names to guess their passwords, which will have great security risks to the whole computer system. In order to ensure that there are no security risks in the system, we can also provide a method to modify the WINNT registry, and automatically use the user name and password of a group to access WINNT at startup, instead of automatically clearing the user name information of the last visitor in the login window through manual setting. To realize the automatic clearing function, the following configurations must be made: a. Select the run command in the start menu bar, and enter the REGEDIT command in the run dialog box to open the registry editor later.
B in the open registry editor, expand the following key values in turn: [HKEY _ Local _ Machine \ Software \ Microsoft \ Windows NT \ Current Version \ Winlogon].
C. In the list box on the right of the editor, select the key name "DONTDISPLAYLASTUSERNAME". If there is no key name on it, you can add a key name by using the "New" key command in the Edit menu, and select the created data type as "REG_SZ".
D, select the specified key value and double-click. When the string editor dialog box appears, enter "1" in the string text box, where "1" means to enable the function and "0" means to disable it.
E. When the user restarts the computer and logs in to WINNT, the "User Name" text box in the NT login dialog box will be blank.
2. Manually configure some non-SCSI interface CDs.
If you want to install a CD-ROM drive with non-SCSI interface on WINNT, this type of CD-ROM drive may be automatically recognized on a computer with a higher version of WINNT, and the computer will automatically complete its installation task. It's a pity that your computer has installed a lower version of the operating system, such as WINNT3.5. You haven't had time to upgrade, and now you need an optical drive urgently. What should you do? Don't worry, although Windows NT3.5 can't automatically identify the CD-ROM drive with non-SCSI interface, we can easily solve this small problem by manual installation. The specific steps are as follows:
A, first of all, you must copy the corresponding optical drive with non-SCSI interface in your hand from the installation disk to the WINNT\SYSTEM32\DRIV ERS directory.
B. open the settings icon in the WINNT main group.
Select Add/Remove SCSI Adapters from the options menu. D. Click the Add button with the mouse to select the corresponding driver for your non-SCSI interface CD.
E, and then click the "Install" button to configure some related parameters. F, exit Windows NT, and the CD-ROM drive will be useful after restarting the computer.
3. Improve NTFS performance
If users want to improve the performance of NTFS, they can also achieve this goal by modifying the registry. The specific implementation steps are as follows:
A. Open the Registry Editor and expand the following key values in the editor: HKEY _ Local _ Machine \ System \ Current Control Set \ Control \ File System.
B use the mouse to click the edit menu in the registry editor, select the new menu item in the drop-down menu, and click the DWORD value in the pop-up submenu.
C enter the name of DWORD value as "NtfsDisableLastAccessUpdate" in the list on the right side of the editor.
D, then use the mouse to double-click the key value of NtfsDisableLastAccessUpdate, and the editor will pop up a dialog box named "String Editor". Enter the value "1" in the text field of the dialog box, where 0 means "cancel" the function and 1 means "enable" the function.
E. After the setup is completed, restarting the computer will make the above functions take effect.
4. Repair the mirror group
A. When the drive in the mirror disk group fails, the system will automatically send data transmission requests to the remaining drives, so that the working drive can run independently. At this point, the user needs to enter the disk administrator, select the mirror group, and then select the fault-tolerant/interrupt mirror to divide the mirror group into two independent parts.
B. The normal drive gets the drive letter used by the disk group, and the failed drive gets the next valid drive letter of the system. Shut down the NT server and replace it with a hard disk of the same model.
C restart the NT server, run the disk manager, select the partition and unused space on the new drive, and select fault tolerance/mirror to mirror the new drive.
5. Customize startup information
Every time you start WINNT, the message "Please press CTRL+ALT+DELETE to log in" will be displayed. If you want users to automatically display the information they want to see on the screen after pressing CTRL+ALT+DELETE, you can do this through the following related settings:
A, select the run command in the start menu bar, and enter the REGEDIT command in the subsequently opened run dialog box to open the registry editor.
B in the open registry editor, expand the following key values in turn: [HKEY _ Local _ Machine \ Software \ Microsoft \ Windows NT \ Current Version \ Winlogon].
C in the list box on the right of the editor, select the key name of "LEGALNOTICECAPTION". If there is no key name on it, you can add a key name by using the "New" key command in the Edit menu, and select the created data type as "REG_SZ".
D, select the specified key value and double-click. When the "String Editor" dialog box appears, enter the title content of the information window that the user wants to see in the "String" text box, such as "WINNT Network".
E, and then enter the specific content to be displayed in the information window in the next "String" text box, for example, enter "Welcome to W".
What is a registry?
The registry may seem mysterious because it has a complex structure and irrelevant CLSID keys. Unfortunately, Microsoft did not fully disclose the supporting information about the correct setting of the registry, which made the registry look more unpredictable. The processing and editing of the registry is like "black art", and its setting in the system makes users feel like groping in the dark. In this way, due to users' lack of understanding in this area, more registry failures occur.
Windows registry is a set of data files that help Windows control hardware, software, user environment and Windows interface. The registry is contained in two files system.dat and user.dat in the Windows directory and their backups system.da0 and user.da0. You can access the registry database through the regedit.exe program in the Windows directory. Previously, in the early version of windows (before win95), these functions were realized by win.ini, system.ini, etc. Ini files related to 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 computer hardware, and win.ini manages desktops and applications. All drivers, fonts, settings and parameters will be saved in. Any new program will be recorded in. Ini file. These records will be referenced in the program code. Because of the file size limit of win. INI and system.ini, programmers add assistance. Ini file to control more applications. For example, Microsoft Excel has an excel.ini file that contains options, settings, default parameters and other information related to the normal operation of Excel. In system.ini and win.ini, just point out the path and file name of excel.ini
At the beginning, system.ini and win.ini controlled the characteristics and access methods of all windows and applications, and they worked well in the environment of a few users and a few applications. With the increase of the number and complexity of applications, it is necessary to provide the. Ini file. In this way, in a constantly changing environment, everyone will change after the application is installed in the system. Ini file. However, no one will delete it. Ini files, so the two files, system.ini and win.ini, will get bigger and bigger. Every addition of content will lead to slower and slower system performance. And every time you apply the upgrade, there is a problem: the upgrade will add more parameter items but never delete the old settings. There is another obvious problem. The maximum size of. The ini file is 64KB. In order to solve this problem, software vendors began to support their own. Ini files, and then point to specific ini files, such as win.ini and system.ini files. So, how heavy. The ini file affects the normal access level setting of the system. If the application's. Ini file and win. INI files conflict, whose priority is higher?
The registry was originally designed as a data file related to the reference file of the application, and finally expanded to include all the functions of the 32-bit operating system and the application. The registry is a set of files that control the appearance of the operating system and how to respond to external events. These "events" range from direct access to hardware devices to how interfaces respond to specific users to how applications run. Because of its purpose and nature, the registry becomes very complicated. It is designed for 32-bit applications, and the file size is limited to about 40MB.