The registry contains information that Windows often refers to during its operation, such as the configuration file of each user, the applications installed on the computer and the document types that each application can create, the property page settings of folders and application icons, the hardware existing on the system and the ports being used.
The registry replaces most text-based ones. Ini files used in Windows 3.x and MS-DOS configuration files (for example, Autoexec.bat and Config.sys). Although several Windows operating systems have registries, the registries of these operating systems are still somewhat different.
Registry data is stored in a binary file.
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.
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.
Registry is a data file designed for all 32-bit hardware/drivers and 32-bit applications in Windows NT and Windows95. 16-bit driver can't work under Winnt, so all devices are controlled through the registry, which is generally controlled through BIOS. Under Win95, 16-bit drivers will coNTinue to work in real mode, and they are controlled by system.ini. 16-bit applications will work under nt or Win95, and their programs will still refer to win.ini and system.ini files for information and control.
Without the registry, the operating system will not be able to obtain the information needed to run and control the connected devices and applications, and correctly respond to user input.
In the system, the registry is a database that records the settings and locations of 32-bit drivers. When the operating system needs to access hardware devices, it uses drivers, even devices supported by BIOS. Drivers are required when installing devices without BIOS support. This driver is independent of the operating system, but the operating system needs to know where to find them, file names, version numbers, other settings and information. If there is no registry to record devices, you cannot use them.
When a user is ready to run an application, the registry provides application information to the operating system so that the application can be found, the location of the correct data file can be specified, and other settings can be used.
The registry stores location information about default data and auxiliary files, menus, button bars, window states and other optional items. It also saves installation information (such as date), the user who installed the software, the software version number and date, serial number, etc. It contains different information according to the installed software.
But generally speaking, the registry controls all 32-bit applications and drivers, and the control mode is based on users and computers, and does not depend on applications or drivers. The parameter items of each registry control the functions of users or computers. User functions may include desktop appearance and user directories. Therefore, computer functions are related to the installed hardware and software, which is common to all users.
Some program functions have an impact on users, sometimes on computers rather than personal settings. Similarly, drivers may be specified by users, but in many cases, they are common in computers.
Examples of registry control user modes are:
Control panel function;
Desktop appearance and icons;
Network parameters;
Browser functions and features;
Some of those functions have nothing to do with users, and some are aimed at users.
Computer-related controls are based on the computer name and have nothing to do with the logged-in user. An example of a control type is installing an application. No matter which user, the availability and access of the program are unchanged. However, the icon for running the program depends on the user who logs on to the network. The availability and priority of network protocols are computer-based, but the current connection is related to user information.
The following are some examples of basic and computer control entries in the registry:
Access control;
Login confirmation;
Enjoy files and printers * * *;
Network card settings and protocols;
System performance and virtual memory settings;
In the system, the registry controls all 32-bit applications and their functions, as well as the interaction of multiple applications, such as copying and pasting. It also controls all hardware and drivers. Although most of the settings can be installed through the control panel, understanding the registry is still the basic knowledge of Winnt and Win95 system management.
Hardware setting changes or hardware failure.
1) If there is something wrong with the computer system itself, the registry will be damaged. Usually, these errors can be avoided by proper system maintenance and management.
2) Virus problem. Viruses secretly change normal files and some contents in the registry to affect our system.
3) If the power consumption of the computer is abnormal, it will also affect the computer system, which can be avoided by using UPS.
4) Disk problem. Many times you will replace the hard disk because of hardware failure caused by insufficient capacity. Of course, if the whole hard disk fails, you must restore your registry from the backup. Other faults are faults of independent sectors or just a bunch of disks. Although these situations can't happen in today's system, the failure of the surface media of the disk will make the disk unreadable, including those registry file locations.
3. The user changed the registry.
1) Change the registry manually. When people manually edit the registry, due to the complexity and arduousness of the data, it is inevitably prone to errors, and this kind of error may be very serious, leading to the interruption of system work.
2) Copying other registries is a serious mistake that many users will make. Because the registry files copied from other machines do not mean that they can work normally on this machine. The registry is special for a single system. Even if the computer hardware devices are the same, the copied registry may not run on another system. If you use the registry of another system, most hardware devices will not work, and user and security problems may make data and application information unavailable.
Protect the Windows registry
Protecting the registry is very important and there are many different tools to achieve this goal. When there is no security setting, users may make more mistakes. Fortunately, they can protect the Windows registry in several ways, and when the registry fails, they can restore it with extra copies. Here are some of them:
1, using windows backup software.
Note: there are some differences between Win95 and Win98 backup programs, so only Win98 backup program is mentioned here.
Win98 includes a backup program. If you choose Custom Installation when installing Win98, or you can install it in Add/Remove Programs in Control Panel. When you install this backup program, you can run it from the Start menu | Programs | Accessories | System Tools | Backup. At startup, the program will prompt you whether to create a new backup, open an existing backup job or restore the backup file.
If you choose to create a new backup, the backup wizard will prompt you how to make a backup.
If you choose to cancel the wizard, you can manually set what you want to back up. In the backup content, you can back up files on the network and local drives. You can make a backup by selecting the check box of the disk or file to be backed up. Then fill in the backup location to be backed up. If you want to back up with the windows Registry, just check the "Back up the windows Registry" checkbox in | Options | Advanced. Recovery is the reverse process of backup, so I won't go into details here.
2. Copy the registry file in safe mode.
When Win95 is running, the registry file is locked and can only be accessed by the registry editor or the system itself. These files cannot be copied to other places. If you start Win95 in safe mode, the registry will not be loaded in the same way, so the system. Data and users. DAT can be copied. In fact, system files are protected in safe mode.
At startup, when the computer shows that Windows 95 is being started ..., press F8 to enter safe mode. Change the hidden and read-only properties of the system. Data and users. So you can see and copy them. After copying the registry files, don't forget to change them back to read-only and hidden properties.
3. Use Microsoft Configuration Backup to back up your registry file.
CFGBACK.EXE is the backup software that comes with WIN95 (Win95(Win98) doesn't). It is located in the directory \Other\Misc\CFGBACK on the Win95CD. Copy all files to any directory in the system, and then create a shortcut to CFGBACK.EXE on the desktop.
To backup the registry, start CFGBACK, then enter a name in the selected backup name location, and click Backup to continue.
Note: Before using CFGBACK, please make sure that you have closed all running programs. If the program is running, CFGBACK may cause the system to crash, lose data, and save incomplete backups.
4. Export the registry
In my opinion, if you don't have a tape drive or something. One export option for REGEDIT.EXE is to export to a text file. The compression tool is usually used, and the export tool option can also be used as a method to save and protect the registry.
To export any key in the registry, select the key and choose Register | Export Registry File. This will copy the key and prompt you to store the key and its name there, and then use the file extension. Register.
When we export the registry in text format. We can use compression tools such as pkzip or other compression tools (which can run in normal Dos mode) to save space.
For backup, we can create a folder in the windows directory for backup. We should make regular backups at least once a month. Because many computer users subscribe to or buy computer magazines with free CDs. There are many time-limited software on these CDs. Many users install one or more programs through it. When the software expired, they installed these programs, but these programs left some traces in the registry. Frequent adding/deleting programs will affect the registry, but with backup, we are relatively safe.
We have to restart the computer and import it in DOS mode. Suppose you export the registry as mar99.reg, and now type it at the command prompt.
REGEDIT /C MAR99。 Vehicle registration number
Registry editor will import the data in mar99.reg into the registry and save it. However, this full import work is more reliable only at the command prompt.
Tip: If your registry gets bigger and bigger, export it first, and then import it one by one as above. During the import and export process, unnecessary items in the registry will be cleared. If you use Win98, you can use the Scanreg.exe program. Press Scanreg /fix at the windows directory command prompt to execute the command.
Remember, prevention is far better than repair. The registry is too easy to change, and having multiple copies of the registry is the best way to solve the problem in an emergency.
Recovering from Registry Failure
There are four different levels of methods to recover from Windows registry failure.
restart
Reexamination
recover
reset
Let's look at each method to determine the best time to use it and what kind of problems to solve.
Restart (restart)
Most of the contents of Win95 registry are stored in RAM. If any information is damaged, it must re-read the correct information. When you restart the system, the registry can read data from the hard disk to RAM and use it.
Take the problem of font ID. Each font used in the system has an ID number. When a font is used in a document, the font is saved by the number and identified by a name. When the font ID is damaged, the font display and printing will be replaced by other fonts. Restarting the system to refresh the data in the hard disk will generate the repaired font ID, so that the font display and printing will become normal.
This is also a reason why Windows system failures often return to normal after restarting.
Re-inspection of equipment (re-inspection of hardware)
If the device is not working properly, the settings that control the device in the registry may be damaged. In order to reset the registry, you should delete and reinstall the device drivers, or let Win95 retest them. Many times, when a device doesn't work properly, an exclamation mark will be displayed in front of the device in the device manager. Obviously, if the equipment never works, that may be another problem. However, if the device used to work normally, but now there is a problem, you need to restore the registry.
To detect the device, select Add New Hardware on the Control Panel. The first question is "Do you need Windows to search for new hardware?" If you choose "Yes", Win95 will conduct a thorough search to find the "new" device. Any device with incorrect settings or no driver found will be detected and displayed.
Restore (restore)
Restore registry from CFGBACK
Restoring the registry from CFGBACK has many advantages. If you have made multiple backups, you can choose the correct backup to restore. You can place and arrange registry parameter entries like surgery.
Import registry file
As mentioned in the previous chapter, another way to use backup is to import a. REG file. Yes. The REG file contains the location of the target data, so just double-click the file and put the data into the registry. This is the simplest of all recovery processes, but it may also lead to errors. This error will not be writing data in the wrong place with REGEDIT.EXE, but it is likely to happen when the user directly double-clicks the registry file.
Reinstall
reset
The last method is to reinstall drivers, applications or Win95. Generally speaking, it only takes about an hour to do these things. If you reinstall on an existing file, a lot of configuration information will be installed in the same location. In addition, you should add the configuration data again when installing the driver.
In fact, it takes more time to find out the cause and fix it than to reinstall it, which is why reinstallation is a quite common "solution" in technical support. The key question is, "Do you want to find out the problem, or do you just want it to work properly?" The answer depends on the user who asks questions, the frequency of problems and the practicality of reinstalling software.
When Windows is first installed, it creates a file named SYSTEM. 1ST in the root directory of the startup directory. This is a simple system.dat file created when Windows first started. What you should do is to put this file in the windows directory (in dos mode) and change its name to SYSTEM.DAT. Then you can get the window that starts for the first time during the installation process.
Because of many changes in. INI,。 DLL and other files, the probability of success of this method is only above 50%. For example, if IE4.0 is installed, the system and registry will be completely changed. Although our system. 1st file contains a reference to the Dll file, it may update or change the version number.
Here are some tools and methods to restore the registry when it fails. Your data may be safely restored, but no matter what method you use, the best way is to do a good job of backing up the system registry besides reformatting the hard disk.