Know the Windows XP registry and registry actual case

  
        1. Overview The Windows XP registry is actually a huge database that records various information about the machine's hardware and software environment and is critical to the proper operation of the operating system and applications. Specifically, this database contains initialization information for Windows systems and applications, associations between application and documentation files, descriptions of hardware devices, status, and attributes. The operating system and applications frequently access this database. To save and get the necessary data. A lot of data in the registry can be changed directly through the interface provided by the operating system and application software. The author believes that the direct modification of the registry data has two main meanings: one is quick, can bypass a lot of complicated operations; the second is to change the data of the operating system and application software without modifying the way to achieve special purposes. It should be noted here that since Windows XP is a strict multi-user operating system, it should be entered as a member of the Administrative Group when performing registry operations. In Windows 9X, the registry data files are stored in the Windows directory of the system disk (user.dat and system.dat). In Windows XP, most of the data files are stored in the "%SystemRoot%\\system32\\config" folder ("%SystemRoot%" is the location of the folder system32, such as "c:\\Windows"). The directory contains five files with no extension, the current registry file: DEFAULT (the default registry file, located under the HKEY_USERS entry in the registry) SAM (Security Account Manager registry file, located in the registry HKEY_LOCAL_MacHINE \\SAM item branch) SECURITY (safe registry file, located under the HKEY_LOCAL_MacHINE\\SECURITY branch of the registry) SOFTWARE (application software registry file, located under the HKEY_LOCAL_MacHINE\\SOFTWARE branch of the registry) SYSTEM (system registry file, Located under the HKEY_LOCAL_MacHINE\\SYSTEM branch of the registry) Windows XP will back up the registry file after the system is installed to the "%SystemRoot%\\Repair" directory, so that it can be repaired with this backup file in case of system failure. See later). 2. Windows XP Registry Editor Windows provides an editor for editing the registry file, click "Start" → "Run", enter "regedit" and press Enter to enter. The interface of the Registry Editor is similar to the Resource Manager, which involves some terminology. The following describes the naming in the Windows XP Chinese Help file. The left column of the editor is a tree directory structure. There are five root directories, called subtrees. Each subtree is prefixed with the string "HKEY_" (HKEY_CLASSES_ROOT, HKEY_LOCAL_MacHINE, HKEY_USERS, HKEY_CURRENT_USER, HKEY_CURRENT_CONFIG); For items, children, and activity children, the activity child corresponds to the value item in the right column, and the value item includes 3 parts: name, data type, and value. Items, sub-items, and value items can be directly modified, added, and deleted in the Windows XP Registry Editor, and the Find command can be used to quickly find each sub-item and value item: (1) Set permissions: In the case of multiple users, Setting a branch of the registry cannot be accessed by the specified user by selecting the item to be processed and selecting the menu "Edit" → "Permissions", and then setting the corresponding permissions in the dialog box. However, it should be noted here that setting access rights means that any program that the user runs after entering the system cannot access this registry key. Users who are not familiar with this function should use this function with caution. (2) Find: Select menu "Edit" → "Find" (or press "Ctrl+F"), in the "Find" window that pops up, select "要" to find the type of target, and enter the content to be found, click The "Find Next" button waits for a moment to see the result, then press the "F3" button to find the next target. (3) Collection: Some registry keys often need to be modified, and this item can be added to the "Favorites". Select the registry key, click "Favorites" → "Add Favorites", enter the name and confirm the registry key will be added to the "Favorites" list, you can click directly from the "Favorites" when you visit later. Finding and collecting are important features of the Registry Editor and should be used more. (4) Add a child or value item: Select the registry key under which you want to add a new item in the left pane, then right-click in the right pane and select New → Item or Value Item type of data. (5) Change the value item: Right-click the value item you want to change, select "Modify", then enter the new data and "OK". In fact, if you want to delete or rename a sub-item or a value item, just select the corresponding object and right-click to perform the corresponding operation. (6) "Export" and "Import" of the registry key: It is recommended that when modifying the registry, if you are not sure, please export the modified item first to prepare for the modification error and then import and restore. Select the registry key to be exported, click "File" → "Export", "Save Type" generally select "*.reg", enter the file name and click "Save". To import a backed up registry key, just click "File" → "Import" and select the file to be imported. If it was saved as a .reg file in the previous step, double-click this file to complete the task. 3. Backing up the registry In order to repair the registry in time after it is repaired, it is necessary to back it up. This can be done with the backup tool that comes with Windows XP: Click “Start” → “All Programs” → “Accessories” → “System Tools” → “Backup”, cancel the wizard mode and bring up the “Backup Tool” dialog box. Click the “Backup” tab, then “√” select the “System State” item, and click “Browse” in the lower left corner to select the location where the backup file will be stored. Finally, click "Start Backup" and the system will start backing up the files. It should be noted that such a backup is a backup of the associated system files. Although it takes a lot of time, it is very safe (described later) and is easy to operate. If you only back up the registry information, then back up the five registry data files mentioned above. Exploring the Windows XP Registry Windows XP Registry In addition to the five subtrees mentioned above, there is actually a hidden performance subtree HKEY_PERFOR MANCE_DATA that contains information between Windows XP some performance tools and performance data; This subtree content cannot be seen in the table editor and can only be accessed programmatically, so this article will not be introduced. In the Windows XP registry, the HKEY_CURRENT_CONFIG subtree has less information and is not very useful. It is skipped here. The information under HKEY_CLASSES_ROOT is the same as the information under HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes, and the other is automatically changed as soon as one change is made. The HKEY_USERS subtree is useful, especially the .DEFAULT item, which saves the default user's software settings. If you want to restrict the newly created user's software settings, you can modify it here; if the current user has been created, modify this subtree to modify it. Invalid, but should be modified by HKEY_CURRENT_USER. In this way, the registry content we pay attention to is actually concentrated under the two sub-trees HKEY_LOCAL_MacHINE and HKEY_CURRENT_USER. The two sub-trees will be explored in depth later. The examples are closely related to everyone, but their meaning is not. Small, but we hope that you will analyze these examples in detail and draw regular conclusions to achieve the same effect. 1. HKEY_LOCAL_MacHINE subtree detailed This subtree mainly stores Windows XP system information, commonly used to SOFTWARE and SYSTEM two sub-items. (1) HKEY_LOCAL_MacHINE\\SOFTWARE The data under this item stores information about the application and system software. This registry entry should be entered whenever a specific software modification is involved. 1HKEY_LOCAL_MacHINE\\SOFTWARE\\Classes This item stores information about open programs and registered programs for different file types. You should enter this item on what software to open, play, and so on. Example: Changing the default open program of an AVI file First, let's analyze the storage location of the AVI file open program. In the Registry Editor (unless otherwise specified, in the Registry Editor) expand the .avi under the Classes above, and find that the data in the "default" value item in the left pane is "AVIFile", so find the same AVIFile under Classes, expand shell\\open\\command under it, and find its default value points to Windows Media Player), that is, AVI files are played by WMP by default. Therefore, there are two ways to modify the default open program: one is to change the default value under the above command item to the specified program, such as "D:\\Winamp2 Classic\\Winamp.exe" on the author's hard disk, but the result of the above method First, the display icon of the AVI file is still the original Media Player style; you can also modify the default value in the above .avi item to point to the registered location of Winamp2, so you can still find it under the above Classes, and you find that there is Winamp.File. The child, so the default value in the .avi item is changed to "Winamp.File", and the effect is changed as soon as the hit is effective. If you find that both of these modifications don't work for the open program, it doesn't matter. This is because the AVI extension information is overwritten in HKEY_CURRENT_USER. You will see the following content. Consolidation: To prevent the CD from running automatically, simply expand the AudioCD\\shell subkey under the Classes item above and set the "Default" value item to empty " " in the right pane (ie enter a space). 2HKEY_LOCAL_MacHINE\\SOFTWARE\\Classes\\CLSID This sub-item stores information about the class ID (CLaSs ID) assignment. Almost all OLE-enabled applications in Windows XP have a valid class ID. This sub-item is of great significance to the programmer. For ordinary users, it can be used to modify the prompt information of a specific icon. This sub-item is more common, it is recommended that you collect it for your convenience. Example: Modifying the Recycle Bin Tips The specific icons mentioned above include 5 icons under HKEY_CURRENT_USER\\Software\\ Microsoft\\Windows\\CurrentVersion\\Explorer\\CLSID, representing Network Neighborhood, My Computer, My Documents, Recycling Station and IE browser. The CLSID value of the Recycle Bin is {645FF040-5081-101B-9F08-00AA002F954E}. Look for this string under the HKEY_LOCAL_MacHINE\\SOFTWARE\\Classes\\CLSID subkey. After you find it, modify the string InfoTip in the right pane. The value is the information you want, such as "E-waste reincarnation." There is also a DefaultIcon (default icon) subkey, but this is also covered by HKEY_CURRENT_USER (in fact, the CLSID subkey under HKEY_CURRENT_USER\\...\\ mentioned above), so it has no effect after the change. Consolidation: Modify the default icon for the "Taskbar and Start Menu" in the Control Panel to find {0DF44EAA-FF21-4412-828E-260A8728E7F1} under CLSID -
Copyright © Windows knowledge All Rights Reserved