您的位置:首页 > 其它

Hive registry的使用设置

2008-04-24 14:02 691 查看
To use the hive-based registry Add the Hive-based Registry Catalog item to your OS design. Verify the following registry settings in the Platform.reg file for your OS design.
[HKEY_LOCAL_MACHINE/init/BootVars]    "SystemHive"="<your system hive location>"    "Start DevMgr"=dword:<your value>
For more information about configuring the registry to support the hive-based registry, see Hive-based Registry Setup.
Set the following registry value in the Platform.reg file for your OS design to determine the default hive to load.
[HKEY_LOCAL_MACHINE/init/BootVars]    "DefaultUser"="<username>"
Verify that all registry entries necessary for starting drivers in the first boot phase are wrapped in the comments. The following code example shows typical comments.
; HIVE BOOT SECTION<your registry settings>; END HIVE BOOT SECTION
These tags are commands that tell the ROM registry builder to add the entries to the boot hive.
Set the following flag bit on each driver that is loaded during the first boot phase.
[HKEY_LOCAL_MACHINE/Drivers/...]    "Flags"=dword:1000
The flags are a bitmask to OR with any existing settings. This flag tells the Device Manager to load your driver in the first boot phase with the boot registry, and not to load it a second time in the second boot phase with the system registry. It prevents the driver from being started twice.
Set the MountFlags registry value equal to DWORD:2. Set this value on the Storage Manager profile of the file system driver for the medium that contains the registry. This indicates that the file system contains the following registry key.
[HKEY_LOCAL_MACHINE/System/StorageManager/Profiles/<ProfileName>/<FileSystemName>]    "MountFlags"=dword:2
Decide whether a registry flushing mechanism is necessary. Outstanding registry data will be flushed on a suspend or resume cycle and any time the system goes through a software shutdown. However, data may be lost if power is suddenly removed. If a software shutdown is not an option, you may need to create a thread that periodically flushes data. To ensure that data is not lost, call RegFlushKey. This will flush any unsaved changes in the hive to the persistent file. It will not damage anything to call RegFlushKey when no data has changed; in that case, the file will not be touched. RegFlushKey should be called on both the system hive HKEY_LOCAL_MACHINE and the user hive HKEY_CURRENT_USER.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: