The registry is a large database of Windows systems that stores system hardware, software, and user information. Modifying the parameter values of the registry appropriately can improve the performance of the system. There are usually two ways to modify a registry: one is to modify it with the "RegEdit" command provided by the Windows system. This approach is intuitive, but because of the complexity of the registry, this method is not quite feasible for the general user. The second way is to programmatically access the registry. Mastering this method is an important basic technology for programmers. Because in our programming process, many places need to be programmed to access the registry. For example, you are familiar with the "Super Rabbit", "warrior modifier" and so on, are in this way to complete the registry changes, so as to protect the system or improve the performance of the system.
The following is an example based on how to programmatically modify the registry in Delphi. Through this study, you can obtain the following knowledge:
First, a clear programmatic access to the basic idea of the registry;
Second, clearly how to complete the registry in the program read and write operations;
Third, you can transfer the method described in this article to VC, VB and other languages, extrapolate, analogy, to achieve the purpose of modifying the registry.
Through practice, you are quite likely to write a system modifier like "Super Bunny".
One, the example narrates
1, program name: "Hidden Drive" (Hide_drive.exe)
2, Program Interface: The interface of the program running as shown in figure
3. Function Description:
(1) The user can select "a" or "B", or both "a" and "B-Drive", and click the Hide button to hide the floppy disk drive in My computer.
(2) When the program is started, you can determine the current state of the floppy disk in the system. If the floppy disk B in your system is already hidden, the interface at the start of the program is shown in Figure two.
4, Special note: This program is a typical of the registry to read and write operations.