First, the importance of the registry
In the DOS era, the memory management and system configuration of the computer is mainly passed through AutoExec. BAT and config. SYS is completed. From Windows3. X began, the management of the system has increased a lot of *. INI files to log in to various initialization information for software and hardware. This brings flexibility for system management and inconvenience. Because each application has its own INI file and in Win. Ini adds your own configuration, which makes the INI file, and WIN. INI is increasingly huge.
Starting from Windows95, the information stored in the initialization file is moved to the system's registry, the registry (registry) is substantially a huge layered database, which stores the following:
Soft, hardware's initial conditions, preferences, and uninstall data for configuration and status information, application, and resource manager housing;
The settings of the entire system and various licenses, file extensions and applications, descriptions, status, and attributes of hardware;
Computer performance records and underlying system status information, and other types of other data.
As can be seen, the registry is the life of Windows, the registry file is damaged, the setting error will cause the application to fail, the system is wrong, until the system crashes or cannot be started.
Second, the structure of the registry
The registry of Windows98 is consisting of binary data to distribute with a tree structure. The registry consists mainly of the following two files:
SYSTEM. DAT (Store system configuration information that is unrelated to users, including hardware configuration, software installation, etc.)
User. DAT (Store information related to the user and application installation information specific to a user),
These two files are typically stored in the folder where Windows is located, and there are backups of these files *. DA0 (Windows system automatically backed up each time the system is configured, generating System.DA0 and User.da0 files).
Windows provides us with a tool for registry editor, which can be used to view and maintain registry. Click the "Start" menu, select the Run item, enter "Regedit" in the "Open", OK, you can open the registry. The Registry Editor is similar to the interface of the resource manager. In the left pane, starting from "My Computer", the following is six branches, the meaning is as follows:
u HKEY_CLASSES_ROOT: The information stored here ensures that the correct application opens the corresponding file type when using the Windows Explorer to open the file.
u HKEY_CURRENT_USER: Store information about the current login user. The user folder, the screen color, and the Control Panel are set here. This information is called a user profile.
u HKEY_LOCAL_MACHINE: Contains configuration information for the computer (for any user).
u HKEY_USERS: Store profiles for all users on your computer.
u HKEY_CURRENT_CONFIG: The hardware configuration file information that contains the local computer when the system is started.
u HKEY_DYN_DATA: Record the status of the system running moment.
The registry is organized according to the hierarchy, and the six branches are starting with HKEY, called the primary key (key), which is similar to the folder in the Explorer, which indicates the icon of the primary key to the icon of the folder. There is a " " icon on the left side of each primary key icon. Click to expand this branch, and you can see the primary key (Subkey). When you click a primary key or subordinar key, the right pane is displayed is one or more key values (Value) included in the selected master key.
The key value is composed of key value name (valueData), which is represented by two lists (names, data) in the right window. The primary key can contain multi-stage secondary primary keys, and the information in the registry is organized according to the multi-level hierarchy. Save information and data in a computer software or hardware in each branch.
Third, the key value item data in the registry
The registry manages various information through the keys and sub-keys. However, all information in the registry is saved in various forms of key value item data. The key value items are displayed in the right pane in the registry editor. These key value items can be divided into three types:
1. String value
In the registry, string values are generally used to represent the description and hardware identity of the file. It is usually composed of letters and numbers, or a Chinese character, the maximum length cannot exceed 255 characters.
2. The binary value is not limited in the registry, which can be any byte length. In the Registry Editor, binary is expressed in hexadecimal.
3. DWORD value
The DWORD value is a 32-bit (4 byte) value. In the registry editor, it is also expressed in hexadecimal ways.
Fourth, registry application
(1) Backup and recovery of the registry
Since the registry file has a vital role of the computer, it should be backed up regularly. The method of the backup registry is: Open the registry, select the Export Registry File command in the Registry menu, in the Export Registry File dialog box, select the save location and take a document name, select in the export range All (ie, back up the entire registry) or in the selected branch, enter the branch to be backed up, and finally click the "Save" button.
The method of restoring the registry is very simple: open the registry, select the "Introduction Registry File" command in the Registry menu, select the previous backup registry file that you want to compete, click the "Open".
(2) DOS recovery method of the registry
Sometimes due to the damage cause of the registry, Windows cannot start or work error. At this time, you can restore a registry of the Windows system automatically backed up in the DOS mode to restore the Windows system, the method is as follows:
1. Start entering with the system floppy disk (such as Windows can also start, switch to) MS-DOS mode.
2. Enter the Windows / Command directory, enter the ScanReg / Restore and return to the car.
3. After entering the interface, you can select the desired recovery in 5 registry backups, will be restarted.
(3) Clear extra DLL files
There are a large number of DLL files in the System subdirectory of the Windows system, which may be shared by the system or application. However, due to frequent installation and uninstall software, some DLL junk files will be left in the System directory. They not only occupy the hard disk space, but also reduce the running speed of the system.
You have to identify, delete the DLL files that are not shared by the system or application, run "regedit", open the registry editor, find hkey_local_machine / Software / Microsoft / Windows
/ CurrentVersion / SharedDlls branch, in the shareddlls subkey, recorded is the DLL information shared by the program, and the key value of each DLL file means that it has been shared by several applications. If the binary key value is "00 00 00 00", it indicates that it is not shared by any program, you can delete it, exit the registry editor, and remove the corresponding file in the System directory. (You have to automatically clear the junk file in the registry, you can use the "Super Rabbit" software to optimize, and you can go to www.superrsoft.com website on the "Super Rabbit" software.
(4) You must log in when you start your computer
Windows98 has a login dialog box when starting, requiring the user to select the username and enter the password, but this does not work, any user can click the "Cancel" button to activate the computer. By modifying the registry, you can enable Windows to start, the user must enter the password to log in, thereby preventing illegal users from using a computer, the specific modification method is as follows: Find the HKEY_LOCAL_MACHINE / Network / Logon button in the registry, click in the right window Right-click, create a DWORD value, and name it MustbeValidated, change its value to LL1LLLL, so that you must enter your password when you start your computer, otherwise you cannot log in.
(5) Automatically run a program when starting
By adding a program to the "Start" menu item in the Start menu, the computer runs automatically in the startup, which is easily changed by other users, because it can be removed to remove this The purpose of the start command.
By placing the program that is necessary to run in the startup, it can make it difficult to modify others.
The specific method is to find hkey_local_machine@local_machine@software@wwwarent_machine\windows /
CurrentVersion \Run key, you can see the command to be executed when Windows starts in the right window, we can add the command that Windows will be added at startup. Also delete commands that do not want Windows running at startup.
(6) Expand the function of the right mouse button
After starting your computer, you generally pop up a shortcut menu when you use the right-click a drive, folder or file in the Explorer, which contain several commonly used command options. We can add or delete these commands by modifying the registry. For example, to add an anti-virus command for the drive, the specific operation method is, find the HKEY_LOCAL_MACHINE / SOFTWARE / CLASS / DRIVE button in the registry, right-click the shell subkey, create a new home button, name it "Anti-Virus", then right-click the "anti-virus" button just established, create a new master button, name Command, and modify its key value in the right window, that is, enter the command to execute, for example: "D: \Rxsd \rav\rav.exe "% 1" ", so that when using the right-click on the resource manager, the" anti-virus "option is included in the shortcut menu. Similarly, when operating the folder, simply find the hkey_local_machine / software / pack, for the file, you'll find the hkey_local_machine \Software / Classess \File button, the following operation method is the same.
Finally, I will provide you with a gadget - a VBScript script file, when you have to modify the registry, run the "regedit" command, try to open the registry, suddenly jump out of a warning: "The registry is banned by the administrator! ", Don't let you open the registry! (You can be miserable here, the roots will seal people! This most is fortunate "poisoning" when you go online.), Then you just want to run this VBScript script file to unwinder the registry. You can enter the following text in WINDOWS: DIM WSH
SET WSH = WScript.createObject ("wscript.shell")
Wsh.popup ("will unlock the registry!")
Wsh.Regwrite "HKCU / Software / Microsoft / Windows / Currentversion / Policies / System / DisableregIistryTrytools", 0, "REG_DWORD"
Wsh.Popup ("SuccessFully!")
After the input is complete, take a name when saved, the file extension is VBS.