The registry is very useful and powerful, and it is the core of windows. By modifying the registry, we can limit, optimize and so on. For example, we don't want others to use the Start menu. We can modify the registry to achieve our goal. In addition, there are many,
Quick start to registry modification
As a reminder, if you are not sure, remember to back up the registry before modifying it.
1. Use windows-regedit.exe's registry modifier.
The method is to click Run in the start menu in the lower left corner of windows, then enter regedit and press enter. You can find the registry modification items that need to be modified in the opened modifier. For example, to disable the search function in the start menu, we know that the modified content is: HKEY _ current _ user \ software \ Microsoft \ Windows \ current version \ policy \ resource manager, and create a new DWORD value "NoFind" in the window on the right, with the setting value of 1. (Please refer to this manual). Then when we open the registry modifier, we can see that there is a root key HKEY _ Current _ User and a "+"sign on the left. Click "+"to expand the directory tree below, find the software, then expand to find Microsoft, and so on, until we find the Explorer item, and then look at the window on the right, you will find many key values. Congratulations, you almost succeeded. Then click the right mouse button in the window on the right, select a new DWORD value, enter NoFind, and pay attention to case. You will find a key name called NoFind in the window on the right. Ok, we will assign a value to it, double-click NoFind, and then change the original default 0 to 1 in the pop-up window. Finally, after restarting the computer, you will find that "Search" in the start menu has disappeared. If you are simple? Other modifications are similar. The key is to find the modified content, which is a powerful function provided by this manual. Hehe, I believe it can bring you great help.
2. Use special modification software
If you are lazy, you don't want to know what to modify. Then use a special registry to modify the software. The famous ones are "Super Rabbit Magic" and "windows Optimizer". Let's evaluate it. The name of the windows optimizer sounds loud, but it doesn't work. Personally, I prefer another modifier called "registration terminator", which is mainly friendly in interface, multi-functional and not easy to make mistakes. Now with the introduction of winXP, various modifiers have been updated, but the functions need to be improved. Now the new "Magic Registry" modifier can modify winXP and so on. You can have a try. These modifiers are easy to use and modify. But if you want to learn the registry deeply, you'd better modify it manually, otherwise you won't learn much.
3. write. Manually register the registry file
This is an advanced skill to modify the registry. Have you tried to write your own registry file? Without any modification? Write back the registry file directly-. Register in the registry? Hehe, this skill doesn't need everyone to know, you just need to know the above two. Of course, if you are a computer fan, we are in favor of in-depth study.
Now let's see. Registration documents.
The standard format of. The reg file is as follows:
Registry 4
[Path] (note case)
Key Name = Key Value (used for string key values)
Key name = hexadecimal: key value (for binary key value)
Key name =DWORD: key value (for DWORD key value)
The contents in brackets are my own comments. I don't need those brackets when writing files. Everything else listed above must be included. Note that quotation marks cannot be entered in Chinese, but must be entered in English, or you will make mistakes.
So, how to write a. reg file? We need a text editor, just use windows Notepad. Click the right mouse button, select a new text document, and then enter the contents of the above specifications in the generated text file. Finally, choose Save As and enter the file name you want+. Register to save. For example, if you want to generate test.reg, enter test.reg and save it. You can see that a test.reg with an icon has been generated. Double-click to run this test.reg file and modify the registry accordingly. You will be prompted with information such as "Import Registry" and confirm. Ok, we can write the registration form manually. Isn't it cool?
Don't worry, let's look at a standard example, which is derived from the registry. You can learn slowly and write by yourself. Reg file after imitation.
Registry 4
[HKEY _ Current User \ Software \ Microsoft \ Windows \ Current Version \ Policy \ Explorer]
" NoRun"=dword:00000000
" NoRecentDocsMenu"=hex:0 1,00,00,00
" NoFavoritesMenu " = dword:00000000
"user" ="sundrink "
As you can see, dword is 16, hex is binary, and strings can be assigned directly. Just copy and save the above contents into a text document, and then save it as. The reg file you want to run. Hehe, it's not very difficult. Be patient. Of course, if you want to imitate, you should write. Register your own files, just use a notepad.
Say a few more words, why do you want to hand-write the registration form? Because sometimes we encounter a machine that locks regedit, what should we do to unlock it? Hehe, if you can write the registry file by hand, it will be very simple ... Let's use your imagination! It won't take long.
Since Windows 95, Microsoft has introduced the concept of registry in Windows (in fact, this concept already exists in Windows NT). Registry is the core database of Windows 95 and Windows 98, and it stores various parameters, 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 for some reason, the startup process of Windows will be abnormal, and the whole Windows system may be completely paralyzed. Therefore, it is very important for Windows users to correctly understand, modify, back up and restore the registry when there are problems in the registry.
Remember: make a backup before changing the registry, just in case.
When Windows 98 can't start normally, you can run Scanreg/Restore in DOS mode to restore the registry. If you just want to modify the system settings, it is best to use special tools and software; If you really want to manually modify the registry, it is recommended to make a backup before modifying it. If the registry is destroyed, Windows will not run normally, so we must always back up the registry (in fact, Windows will back up the registry every time it starts successfully).
There are many commonly used registry backup methods and tools, and you can choose one according to your personal needs. If you use "Export Registry File" in Registry Editor, you can export files with the extension. Register. I recommend a good backup tool-Other \ Misc \ ERU \ eru.exe-emergency recovery utility on ——Windows CD. If it's not on the CD, it's on my website. You can download it. This tool is compact, powerful and practical, and can back up all system files such as sysytem.ini, win.ini, msodos.sys, System.dat, etc. The use method is simple. Run ERD.EXE, select a path such as C:\erd (disk A by default) for backup. If it needs to be restored in the future, enter the C: \ ERD directory under DOS and run ERU, and the whole system configuration file can be completely restored. First, ERU.EXE is used for backup, while ERD is used for recovery.
In addition, talk about the whole windows system backup. Because we usually install software, we will delete it when we are not using it. Although the software can be basically deleted now, there are always some software that will leave some garbage, so over time, your window will become bigger and bigger, and the performance of the whole system will decline.
Now there are many backup software, which is also very convenient, such as ghost, so I still choose according to my own habits. There are two simple backup methods under windows:
One is to use xcopy command in dos window under windows,
Xcopy c: \ windows \ *。 * c: \ winbak/s/e/h/k/y/c, the meaning of each parameter is xcopy/? Got it. So your system will be backed up in the winbak directory. Note: This command needs to be run under the dos window of windows, because you run under pure dos, xcopy or xcopy32 will not support implicit and system file copying under long file names and H parameters.
Second, open the Explorer, select View → Options → View from the menu, and select Show All Files, which means all files (system, implied, read-only, etc.). ) can be viewed under Explorer. You are halfway through, and then enter the windows directory. You will see all files, and then select all files (ctrl+A). Is anyone laughing? I tried this trick before, but it didn't work. ) Ha, of course, if you don't copy the system halfway, you will be interrupted protectively. What is the reason for the interruption of copying? We know that windows systems use temporary files as virtual memory. Look, here are the keys. This file is WIN386. SWP, the copy of this file has just been interrupted. The following is very simple. After selecting all files in windows, find WIN386. SWP file, hold down the CTRL key and click it with the mouse. The result is that all files except this one are selected. Then copy it to the pre-built directory. In this way, the backup of widnows system is over. This is because you compare the two directories with different sizes. It doesn't matter, because you didn't copy WIN386. SWP, so there is a difference. This is a temporary file and will not affect the integrity of the system. ? The next time you want to reinstall the system, just change the names of the two directories with the ren command in pure dos. Another thing to note is that we didn't back up the configuration files in the root directory of drive C, so we'd better use ERU or manually back up. Don't talk too much, just do it, and two or three things will be solved. Be sure to verify it after completing the backup, otherwise it will be completely dead without it. Verification method: Under pure DOS, use the REN command to change the directory name, such as: ren windows win, ren winbak windows, assuming that winbak is the directory you just backed up.
I recommend you to use the second method, which is simple and not easy to make mistakes. There is no need to reinstall the system in the future. After installing windows for the first time, you should quickly back up a copy of windows, which can save you a lot of valuable time. Of course, you should back up the whole hard disk or use professional software, such as ghost, otherwise the speed will be slow. ?
Let's look at the registry. You can open the registry by clicking the Run button in the Start menu and typing regedit. Again, don't change it. This is the lifeblood of your window. You must back it up before making changes.
List of approved comments
The role of six basic keys
In the registry, all data are organized by tree structure keys and subitems, which is very similar to the 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 the registry key contains subkeys, there will be a "+"symbol to the left of the folder representing the registry key in the Registry Editor window, indicating that there is more content in the folder. If the user opens the folder, the "+"will become "-".
1.HKEY _ user
The root key holds the user ID and password list stored in the password list of the local computer. The pre-configuration information of each user is stored in the root key of HKEY user. Keys user is one of the root keys accessed in the remote computer.
2.HKEY _ Current _ User
The root key contains the currently logged-in user information stored in the local workstation, including the user login username and temporary password (note: the password is hidden when entered). When a user logs on to Windows 98, his information is copied from the corresponding item in HKEY user to the current HKEY user.
3.HKEY _ Current _ Configuration
This root key stores data (such as monitors, etc.) that define the desktop configuration of the current user. ), Last Used Document List (MRU) and other information about the Chinese version of Windows 98 installed by the current user.
4.HKEY _ Class _ Root
Contains all registered ole information and document types copied from HKEY _ Local _ Machine \ Software \ class. According to the extension of the application installed in the Chinese version of Windows 98, root key indicates the name of its file type.
5.HKEY _ Local _ Machine
The root key stores the hardware data of the local computer, and the sub-keywords under the root key are included in the system. DAT to provide the information required by HKEY_LOCAL_MACHINE, or in a set of keys accessible in a remote computer.
Many subitems in this root item are similar to the settings in the System.ini file.
6.HKEY_DYN_DATA
This root key stores the dynamic data of the runtime system, which will change every time it is displayed, so the information under this root key will not be put into the registry.
Understanding keys and subkeys
Registry manages all kinds of information through keys and subkeys. However, all the information in the registry is saved in various forms of key data. In the right pane of the Registry Editor, all key item data are saved. These key project data can be divided into the following three types:
1. string value
In the registry, string values are usually used to represent the description of files and the identification of hardware. It usually consists of letters and numbers, and the maximum length cannot exceed 255 characters. For example, "D:\pwin98\trident" is the key value of the key name "a" and is a string value type. Similarly, "ba" is also the key value of the key name "MRUList". A key item data can be composed of key name and key value, which is equivalent to the setting line under section in Win.ini and Ssyt-em.ini files. In fact, after exporting these key data with registry editor, the form is exactly the same as the setting line in INI file.
2. Binary value
In the registry, the binary value has no length limit and can be any number of bytes. In Registry Editor, binary is displayed in hexadecimal. For example, the key value "80 00 00 00" of the key name wizard is a binary value.
3. Double word value
The DWORD value is a 32-bit (4 bytes, that is, double words) length value. In the Registry Editor, you will find that the DWORD value will be displayed in hexadecimal. When editing the DWORD value, you can choose to enter it in decimal or 16.
In addition, the registration and modification of registry information are generally achieved through the following points:
When installing Win9X, the installer registers system information;
When installing an application, the installer registers the configuration information of the application;
Information monitored and registered by the system plug-and-play function when adding new hardware;
Information change realized by changing system properties and settings through control panel or property dialog box;
Modify the information manually through the Registry Editor.
Advanced skills of maintaining registry under DOS
Hangzhouliang
IT certified librarian
Now with the popularization of computer application knowledge, I think many friends have had a lot of experience and experience in modifying the WINDOWS registry. There is no need to mention the maintenance and modification of the registry under the graphical interface, but sometimes, we may encounter more difficult things, such as the system crash due to human error or malignant viruses infection, and we cannot enter the WINDOWS graphical interface. Is this the only way for us to reinstall? This paper will elaborate how to save the system as much as possible under DOS.
First, use scan/restore.
I think everyone is familiar with this method. As long as you enter this command in the DOS interface, you can recover from the last five registry backups. With luck, the system can be restored immediately. However, in fact, this method has a fatal flaw, that is, you only have the last five days of registry backups to choose from. Because scanreg.exe, which controls automatic backup, will only back up when you turn on your computer for the first time every day. If you install more programs or modify the registry one day, your efforts will probably be in vain. This method is like grasping the eyebrows and beards, and dividing right and wrong together. Whether it can help restore the system, there is always a feeling of resignation. Therefore, I encourage you to use the second method.
Second, regedit.exe uses DOS interface.
If scanreg/restore is compared to a one-size-fits-all method, this method is more like a clever surgical operation, which only aims at diseases and fixes errors, and does not affect other health parts of the registry at all. In this way, we can keep the results of our work to the greatest extent. The idea of using regedit.exe to modify the registry is: first, export the suspicious branches in the registry; Then, use edit for analysis and modification; Finally, healthy branches are re-imported into the registry. Ok, let's take a look at the specific operation of the whole process.
1 Export Registration Branch
The command format for exporting registry branches under DOS is: regedit [/l: system] [/r: user]/e filename [regpath1]. /l: system is the path to specify system.dat, /r: user is the path to specify user.dat If not specified, the system will search in the default path; /E: is the file name of the exported registry branch, and regpath 1 is the registry branch to be exported. For example, we want to export the branch of the default registry that controls system startup to test.reg The command is as follows: regedit/etest.reghkey-local-machine \ software \ Microsoft \ Windows \ currentversion \ run.
Analyze and modify the registry.
In DOS, you can edit *. Reg file, because the registry we exported is actually a text file. However, to correctly find out the place that caused the error and make corrections, we need the experience accumulated in the registry at ordinary times. Next, let's take a look at its basic structure, so that we can have a clear purpose when modifying it.
As we know, there are mainly six branches in the registry, among which the branch that is easy to cause fatal errors and cause WINDOWS to fail to start normally is [HKEY_LOCAL_MACHINE], which records the hardware configuration of the local machine and the corresponding software installed, especially the main key value [HKEY-local-machine \ enum \ PCI] under this branch. Once an error occurs, WINDOWS often fails to start. Such as [HKEY local machine \ enumeration \ PCI \ ven _ 8086 & dev-711& subsystems _ 00000000 & rev-01\ bus _ 00&dev _ 07]. Ven-1002&dev-4c42 & subsys _ 4c42107658 If there is an error here, it will happen.
In addition, [HKEY-Local-Machine \ Software \ Microsoft \ WINDOWS \ Current Version] records the information of the current version of Windows and the programs executed at startup, which is the favorite place for viruses to attack and modify.
As for [HKEY-Class-Root], it records the file type and its associated information, while [HKEY- current-user] records all kinds of information of [HKEY- current-user], including login password and various settings, which generally does not cause fatal errors in WINDOWS, so I will not make a detailed analysis here.
When we analyze and modify these key values, if we encounter any ambiguity, we can export some corresponding branches of the backup registry by exporting the registry at 1 point for comparison. WINDOWS registry backups are all placed in C:\windows\sysbackup. If we want to export the [HKEY_LOCAL_MACHINE] branch of the first registry backup, we can first enter the directory and then type the command: extract/erb000.cab *. *, and extract system.dat and user.dat first. Then enter the command: regedit/L: system. DAT/R: user.dat/ebackup.reghkey-local-machine.. I want to remind you that this is a good way to solve the problem, and you can quickly find out the mistakes by using some file comparison software. Please take your time.
Re-import the modified registry branch.
The format of the command is: regedit/l: system/r: userfile1.regfile2.reg We usually need to modify the default registry file, so we just need to type: regedit file 1.reg in actual use.
Well, after all this talk, let's look at a specific case.
After a machine in the college computer room is restarted, it can't enter the WINDOWS interface in normal mode or safe mode, which shows that the hard disk suddenly doesn't read during startup. I checked the hard disk with ScanDisk and found nothing wrong. During the boot process, boot the log. TXT file generation, boot to the hard disk controller found to be broken. Originally, I wanted to use scanreg/restore to restore the backed-up registry, but in order to speed up the startup, the machine did not back up automatically. So, use regedit to export the [HKEY-local-machine \ enum \ PCI] branch, and type: regedit/ehdc.regHKEY-local-machine \ enum \ PCI; Then use EDIT to check the part about the hard disk controller and find that there is "Channel Options" = hex: 00. The problem is finally found here. It turns out that someone set the IDE controller not to use, so the system can't access the hard disk after loading the hard disk controller, so it is changed to: hex:02;; ; Then type the command: regedit hdc.reg to import the modified information. Restart the machine, everything is working normally.
In this way, the problem is solved without damaging any data. I hope this example can inspire you to maintain the registry skills under DOS. After all, there is a lot of priceless data on our hard disk.