Backup and restore Registry in Windows XP (Part 1)

Have you ever had problems with the Registry? Perhaps professional users and curious people who want to explore everything inside the operating system are no stranger to it. As for me, only a short time after installation

Have you ever had problems with the Registry? Perhaps professional users and curious people who want to explore everything inside the operating system are no stranger to it. As for me, just a short time after installing Windows XP everything was messing with the Registry. After consulting, researching, searching documents from many different sources, I finally found a way to overcome and bring them back to normal operation order. Please share this here to help you avoid embarrassment before the little boys who are also very annoying.

There are two ways to work with the Registry: directly or through an intermediary software. Using software is often rated as safer although sometimes not as effective as direct access. Anyone who has ever used a computer is certainly familiar with how to make changes within the system through middleware. Control Panel is a good example. Changing a setting within Control Panel means changing the contents of a particular Registry. The only thing you can't know is what Registry is and how it changes inside.

Changing by directly accessing the Registry is much more dangerous. In the past, there were two Registry Editor registers, regetdit and regedt32 . But in Windows XP, they are combined into Microsoft Registry Editor Version 5.1. You can use it directly by typing the command name on Run or via Version 5.1. Something Version 5.1 lacks regedt32 "read-only" model. Therefore you will need to be more careful when changing Registry parameters. And remember to always backup a copy of the original parameter to recover when needed.

How is the Windows XP Registry structured?

Open Registry Editor (Figure 1) go to Start > Run > type: regedit in the command box that opens (in the Open line), you will see it is divided into two frames. The left frame is the Keys Pane (main frame), the right frame is the Values ​​Pane (value frame). The left frame has 5 main components, also called original keys as shown below. (In the picture, the red lines are the original key names added).

Registry Editor uses a hierarchical tree structure similar to Windows Explore, but there is a fundamental difference. In Windows Explore, folders appear in both the left and right frames, while Registry Editor is only on the left. The yellow folder icon in Registry Editor shows for each individual key and separates, the right pane is only valid without the directory.

Each primary key has subkeys, each subkey may have its own subkeys. Many times, the total number of subkeys is amazing. Like Windows Explore, the Registry location is defined by a path. Any reference to it starts from one of the five primary keys.

Picture 1 of Backup and restore Registry in Windows XP (Part 1)

Figure 1 : The left pane of the screen is the Key Pane and the right pane of the screen is Values ​​Pane (Value frame).

Note at the bottom of the Registry Editor window: My ComputerHKEY_CLASSES_ROOT represents the path, which will change when you change the location in the Registry structure. This is a convenience, because you always know where the Registry you are editing, instead of having to scroll to the top of the page and immediately return to the white line you are manipulating, which is very time consuming.

Type of backup Registry

Before making any changes, especially on the Registry, the first thing to remember is to back up the current Registry. Only a very small change without backup has been a big mistake, it can cause you many "deadly" problems.

Backing up is simply 'outputting' the part of the Registry into a file that is saved in your system. When you use the export function, you will have to select different file types to save.

Picture 2 of Backup and restore Registry in Windows XP (Part 1)

Figure 2

Each file type in Figure 2 holds a certain important role for the type of output data recorded. If you choose the wrong type for your data, it can lead to many bad results. Understanding them to use effectively is very important.

Registration Files : The Registration Files option creates a ".reg" file, which is the most commonly used file type when backing up the Registry. Registration Files can be used in two ways. One is used as a text file, can be read and edited using Registry Editor's external Notepad program. Every time a change is made and recorded, right-click the file name and use the Merge command (combination) to add the changed file to the Registry. If you perform the additions command for the Registry, and then merge with the previously registered File Registration, anything added via regedit will not be removed. But changes made on the data using regedit already in the File Registration will be overwritten when merged.

Registry Hive Files : Unlike the above Registry Files option, the Registry Hive Files option creates a binary image of the selected registry key. The image file cannot be edited via Notepad, nor can its content be viewed by any text editor. The task of the Registry Hive File format is to create a perfect view of the selection key, allowing you to enter the Registry back to make sure the changes you make are not confusing or ambiguous.

Text Files : As the name implies, this option creates a text file containing information about the selected key. The main purpose is to create a record or snapshot for specific points so that you can refer back as needed. But with Text File you can't combine to merge into the Registry like Registry File.

Win9x / NT4 Registry Files : this option also creates a ".reg" file like Registry Files. This is the old file format, only used in Windows and server versions before XP. With Windows XP, this option is usually used only when you want to merge XP's key with an earlier version of the operating system.

In the above four options, the most effective and safest method for backing up the registry is Registry Hive Files. You often have no problems editing or importing key images. All other changes, additions or phenomena that appear are excluded.

If you want to edit outside the limits of regedit , or if you want to make sure your Registry entries are done, even if the mix is ​​mixed, you should use Registry Files.

If you only want to copy the key, you can reference it using a text editor, but you want to exclude the possibility that the file is suddenly mixed back into the Registry, so use Text Files.

Real backup process

The process of backing up real Registry is quite simple. You only need to decide on the type of backup file and choose to back up a private key or the entire Registry. In the left pane of the regedit program window, select the key you want to back up> right click and select Export to open the Export Registry File Property Sheet. In the Export Registry File Property Sheet window, type the file name and select the backup file type. If you want to be safe, you should choose either Registry Hive Files and Registry Files.

There are two points to note here:

• If the left pane of the regedit program screen appears My Computer, you are not allowed to use Registry Hive Files. Because that's equivalent to backing up the entire Registry. XP requires that you use System State in this case. (System State backup will be discussed in more depth at the end of the article).

• If the left pane of the regedit program screen appears My Computer, you can use Registry Files, but this method is not perfect.

Picture 3 of Backup and restore Registry in Windows XP (Part 1)

Figure 3

Back up individual values

See Figure 3, you will see: the key selected here is HKEY_CURRENT_USERControl PanelDesktop . In the Values ​​Pane box on the left, the current WaitToKillAppTimeout value is 400 . These are private values ​​we will back up.

The registry is actually a large compilation of data. The settings are there for the operating system or an access application. It can't do anything on its own. At first glance you will see nothing important. But considering the really useful information inside, the values ​​stored help Windows XP and the applications work to see the importance of the Registry. Doing wrong, wrong changes can make the operating system no longer work, lighter, it also makes many applications run incorrectly. So it is important to back up the Registry values.

Figure 4 illustrates that the information before being changed will be backed up. You should be aware that this is a valuable part, not a selection key. For example, I decided to edit the value of the WaitToKillAppTimeout string, its original value is 5000 , highlighted in red. When you change, you may delete the original value even if you have not decided whether the number you changed is appropriate. To avoid forgetting the original value, I created the string TEG_WaitToKillAppTimeout (highlighted in green). The "TEG_" cluster is preceded by a real value name to distinguish it and make it more convenient for you to manipulate.

Picture 4 of Backup and restore Registry in Windows XP (Part 1)

Figure 4

Now look at the blue screen below, you can retrieve the original value (the line is highlighted in red) and switch to the new value ( 4000 ) at the same time. Now there are often questions: why can we build two values ​​for the Registry at the same time, causing conflicts? Remember, XP or some application must be programmed to access the appropriate values. Otherwise they become useless. No application or operating system part is programmed to search for a string of values ​​named TEG_WaitToKillAppTimeout that only searches the WaitToKillAppTimeout . So it can happily coexist with WaitToKillAppTimeout , providing logs or logs of changes made to the Registry. For more details, you can add a prefix that is the date value to make changes like TEG08252003_WaitToKillAppTimeout (highlighted in blue as shown in the picture).

Picture 5 of Backup and restore Registry in Windows XP (Part 1)

Figure 5

If changes make the system inoperable, you must use the backup section (the green or blue line), change the edited value (red line) back to the original value. The easier way is to delete the edit string, then right-click on the backup strings and select Rename. Just leave the prefix as you have the original string back.

When done with multiple values ​​on multiple Registry, this method proved very useful. It provides a visual, conspicuous image for all edits made on the Registry value. After two months, if you want to know what changes have been made, simply open the Registry Editor, locate the HKEY_CURRENT_USERControl PanelDesktop key and compare the WaitToKillAppTimeout with the original original backup value. By using the date prefix, you not only know what changes have been made, but also the dates for those changes. After checking the change value, you can go back, remove the new prefix values ​​if you find them annoying the Registry. In my experience, I found that leaving them there would not cause any problems for the system.

Backup private keys

Prefix method

One of the first questions that is often asked after reading the previous section (Private Value Backup) is what happens if the prefix method is also used to back up the private keys. The question is quite interesting and I will take another example to explain to help you understand.

In the previous section we used the HKEY_CURRENT_USERControl PanelDesktop key as an example. Now try to use a prefix to lock the Desktop and see what happens.

• Open the program as shown in Figure 6 to see the initial HKEY_CURRENT_USERControl PanelDesktop key before any changes are made.

Picture 6 of Backup and restore Registry in Windows XP (Part 1)

Figure 6

• Figure 7 illustrates the changes made on HKEY_CURRENT_USERControl PanelDesktop. Just add the "TEG_" prefix for this Desktop key. No changes have been made to WindowMetric subkeys.

What do you think will happen when the change is made and the user exits the system and then returns?

Picture 7 of Backup and restore Registry in Windows XP (Part 1)

Figure 7

• Figure 8: Windows XP automatically recreates HKEY_CURRENT_USERControl PanelDesktop (highlighted in green). But it is different from the original HKEY_CURRENT_USERControl PanelDesktop . There is only one entry in the Values ​​Pane frame and is set by default, there is no subkey WindowMetrics. You can see that the default Bliss program is also ignored on the desktop.

Picture 8 of Backup and restore Registry in Windows XP (Part 1)

Figure 8

How does this tell us how to add the prefix as a key backup method? First and foremost, despite some interesting results, this is not the right way to back up the Registry key. The results cannot be best appreciated while working with the Registry requires a very high level of accuracy and safety. But does not mean that this program is not really worth it. As a debugging tool, this method is useful when changing the name of a key with easy-to-understand prefixes. Then XP or an application can recreate the base key easily. In XP, prefixes are hidden.

( Please note that you can try this method freely, but make sure to back up the Registry information in another location earlier .)

Method of using .REG file

Unlike the aforementioned methods, using the .reg file to back up private keys and the entire Registry branch is a very effective method, usually used by millions of Registry. (See Figure 3 again and HKEY_CURRENT_USERControl PanelDesktop key is highlighted in the Key Pane frame).

The backup procedure of this method is also quite simple. In the Keys Pane pane, right-click on the key you want to back up (in this case, Desktop), write the file name and select the backup file type. In the example in Figure 9, the file name is set to "Desktop", the file type is Registry Files (* .reg).

Figure 9

Notice the " Selected Branch " button showing the actual lock type recorded. A quick check of this information can help you avoid many unfortunate errors. Once the Save button is clicked, the key will be written to a file named "Desktop.reg" according to the location you choose. Some points need to be further noted:

• All subkeys of a backup key will also be backed up. In this case, the backup key selected is HKEY_CURRENT_USERControl PanelDesktop, then its subkey HKEY_CURRENT_USERControl PanelDesktopWindowMetrics will also be backed up.

• Normally, users move the registry backup level higher than necessary. In this example, for example, when marking the backup key as HKEY_CURRENT_USERControl Panel , the HKEY_CURRENT_USERControl PanelDesktop key will be backed up. But there are also many other unexpected keys that also become part of the backup file. You can limit the level of locking you want to get as close as possible by moving the hierarchy farther than necessary. The table below illustrates just how fast the .reg file is increased if the selected endpoint is not reasonable. Obviously the last option marked in red is the case to use. Not only does it require less memory space, but it can be combined quickly and easily when needed with fewer errors.

Input point key Size of the .reg file is recorded My Computer 51.6 MB HKEY_CURRENT_USER 6.72 MB HKEY_CURRENT_USERControl Panel 442 KB HKEY_CURRENT_USERControl PanelDesktop 7.26 KB

( Also )

Update 26 May 2019
Category

System

Mac OS X

Hardware

Game

Tech info

Technology

Science

Life

Application

Electric

Program

Mobile