Hive-based Registry Setup (Windows Embedded CE 6.0)

1/6/2010

With the hive-based registry, you can preserve registry data without modifying the startup or shutdown process. The hive-based registry is available for use with any file system.

The first step in setting up the hive-based registry is to add the hive-based registry catalog item to your OS design.

The largest setup task involves preparing the proper registry settings. These settings govern the target device boot sequence.

Verify the following registry settings in the Platform.reg file:

[HKEY_LOCAL_MACHINE\init\BootVars]
   "SystemHive"="<your system hive location>"
   "ProfileDir"="<your user hive location>"
   "Flags"=dword:<your value>
  • SystemHive is the location and name of the system hive file. Do not include the name of the file system on which the file is stored. The system will determine which file system to use based on other registry settings. Typically, this is a simple location such as "System.hv" or "Documents and Settings\System.hv".

  • ProfileDir indicates the location of the user profile file. Typically, this is a simple location such as "System.hv" or "Documents and Settings\System.hv".

  • The Flags value indicates in which phase of startup Storage Manager or Device Manager starts, and whether the registry affected is a hive-based registry or a registry in external ROM. This value replaces Start DevMgr. It offers more precise control without sacrificing the previous functionality. For example, "Flags"=dword:3.
    In this example, 3 indicates the sum of bits 1 and 2, is equivalent to the following:

    "Start DevMgr"=dword:1
    

    The following table shows possible values for Flags:

Flag bit setting Description

0x00000001

Starts Storage Manager in phase one of startup for hive-based registry

0x00000002

Starts Device Manager in phase one of startup for hive-based registry

0x00000004

Starts Storage Manager in phase one of startup for registry in external ROM, such as BINFS

0x00000008

Starts Device Manager in phase one of startup for registry in external ROM, such as BINFS

If no flags are set, Device Manager and Storage Manager do not start, and the hive is stored in the object store. Because hives that are stored in the object store are lost on cold boot, hives are typically stored outside RAM, making it necessary to start Device Manager.

The value of DefaultUser, a REG_SZ value in HKEY_LOCAL_MACHINE\init\BootVars, determines the default user hive to load. DefaultUser is set to the name of the user to use as the default profile when the system starts. If it is an existing user, the appropriate user hive is loaded. If it is a new user, the user profile is created.

OEMs can set the following registry value:

[HKEY_LOCAL_MACHINE\init\BootVars]
   "DefaultUser"="<username>"

For more information about how to log on other users, see User Profile Setup and User Profile Storage.

For more information about using the hive-based registry, see Implementing the Hive-Based Registry.

See Also

Concepts

Hive-Based Registry
Troubleshooting the Hive-Based Registry
Data Persistence with the Hive-Based Registry