Hive registry的使用设置

To use the hive-based registry

  1. Add the Hive-based Registry Catalog item to your OS design.
  2. 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.

  3. 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>"
  4. 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.

  5. 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.

  6. 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
  7. 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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值