Hive-based Registry Setup (Windows CE 5.0)

Send Feedback

With the hive-based registry, you can preserve registry data without modifying the boot 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. For information about the target device boot sequence, see Hive-Based Registry Startup 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 will be stored; the system will decide 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 boot phase Storage Manager or Device Manager start, 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

where 3 indicates the sum of bits 1 and 2, is equivalent to

"Start DevMgr"=dword:1

The following table shows the possible values for Flags:

Flag bit setting Description
0x00000001 Starts Storage Manager in boot phase 1 for hive-based registry
0x00000002 Starts Device Manager in boot phase 1 for hive-based registry
0x00000004 Starts Storage Manager in boot phase 1 for registry in external ROM, such as BINFS
0x00000008 Starts Device Manager in boot phase 1 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 a cold boot, hives are typically stored outside RAM, making it necessary to start the 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 boots. 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 Using the Hive-Based Registry.

See Also

Hive-Based Registry Startup Sequence | Hive-Based Registry | Troubleshooting the Hive-Based Registry | Persisting Data with the Hive-Based Registry

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.