Use hive-based registry

Source: Internet
Author: User

Here we will not discuss how to use hive. According to the introduction in this document, hive registries are divided into three types: boot hive, system HV, and user hive. Boot hive refers to the registry information that needs to be used in the boot process. This part cannot be put in system hive, so you can put them in Boot hive separately. System
Hive does not need to be placed in Boot and system-related registry information, while user hive is user-related registry information. Let's take a look at the specific content of the three parts:

1. Boot Hive:

The boot hive contains system settings that are applied onLy during boot. The Boot hive is read out of ROM and used to start drivers and file systems needed to reach
System hive file. OnCe the system hive is mounted, the boot hive is discarded. changes made to the Registry during the boot process are copied into the system hive onCe It is available. The Boot hive
In Rom remains unchanged.

In this section, we can understand that the information in Boot is used to obtain the registry information required by system hive in the boot stage. Therefore, the content in Boot hive can only be used to obtain system hive later.

2. System Hive:

The system hive contains system settings that do not pertain to any onE user. The OEM selects the system hive file name and location. The system hive file is typically
Named system. HV, but the location can vary.

The Registry ValueSystemhiveUnderHKEY_LOCAL_MACHINE \ init \ bootvarsIndicates
The path and file name of the system hive.

It can be seen that system has nothing to do with the user. OEM selects the file name and location of system hive. The default system hive will be named system. HV, but the location is not fixed. InHKEY_LOCAL_MACHINE \ init \ bootvarsKey ValueSystemhiveSpecify System
The name and path of hive.

3. user hive:

A user hive contains user-specific settings. All user hives are named user. HV and are located inside separate User Directories. Each directory is given the name of the user to which it belongs.

The Registry ValueProfiledirUnderHKEY_LOCAL_MACHINE \ init \ bootvarsIndicates
The location where all user directories are placed.

User hive includes user-related registry information. All user hive have the same name: User. HV. But put it in different user directories. For example, there are two User Directories A and B, and the user hive in both directories are called user. HV. But one is a/user. HV. The other is B/user. HV. Similar to system hiveHKEY_LOCAL_MACHINE \ init \ bootvarsUnderProfiledirSpecifies the path where all user directories are stored.

With the above information, let's take a look at how to enable hive registry.

1. Add hive-based registry catalog item in Pb.

2. Add the content in the registry [HKEY_LOCAL_MACHINE \ init \ bootvars:

"Systemhive" = "<your system hive location>"

"Profiledir" = "<your user hive location>"

"Defaultuser" = "<username>"

"Flags" = DWORD: <your value>

3. encapsulate the Required Registry Information in the annotations shown in the boot phase.

; Hive boot section

<Your Registry Settings>

; End hive boot section

4. Set the partition for storing system hive after ce5.0.Mountasbootable = DWORD: 1. For earlier versions, you need to setMountflags = DWORD: 2.

The partition path is [HKEY_LOCAL_MACHINE \ SYSTEM \ storagemanager \ profiles \ <myprofile >\< myfilesystem>]

5. If you want to save it automatically after each modification, set "registryflags" = DWORD: 1 "under [HKEY_LOCAL_MACHINE \ init \ bootvars ].

The above information is obtained based on Pb's help documentation and others' blogs. I have not verified whether it can be used. However, it should be almost the same. Let's take a look at your own understanding. For example, our system uses binfs and fatfs, system. HV is stored on the fat, so binfs and fatfs must be enabled in Boot hive, otherwise the system will not be available in the subsequent loading process. if HV is used, other drivers cannot be loaded. Only binfs and fatfs can be enabled in Boot hive so that system. HV can be obtained in the FAT partition so that the subsequent drivers can be loaded normally.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.