Registry Types (Windows CE 5.0)

Send Feedback

Windows CE supports two different registry types: the RAM-based registry and the hive-based registry. You determine the registry type a device uses, which is transparent to both applications and users.

RAM-Based Registry

The RAM-based registry stores all registry data within the object store. This is efficient in terms of speed and size in devices that have battery-backed RAM. Devices that do not power the RAM while turned off must back up the registry during power off and restore the registry when power is restored.

The RAM-based registry is intended for use on devices that experience warm boot often, but rarely or never cold boot.

Hive-Based Registry

The hive-based registry stores registry data inside files, or hives, which can be kept on any file system. This removes the need to perform backup and restore on power off. Removing this work during boot and power off makes the cold boot process faster.

Each file or hive contains a collection of registry data. The hive-based registry is split into two hives: the system hive, which contains all system data, and the user hive, which contains all data pertinent to one particular user. A multi-user system will contain several user hives. A user's hive will be mounted on logon and unmounted on logoff.

The hive-based registry is intended for use on devices that cold boot often, but rarely or never warm boot. It is also useful on devices that require support for multiple users.

A hive is a group of keys, subkeys, and values in the registry that has a set of supporting files containing backups of the data in the hive. A hive is treated as a single unit and is saved and restored as one file.

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 value SystemHive under HKEY_LOCAL_MACHINE\init\BootVars indicates the path and file name of the system 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 value ProfileDir under HKEY_LOCAL_MACHINE\init\BootVars indicates the location where all user directories are placed.

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

The following table shows the standard hives and their supporting files under Windows CE.

Registry hive File Description
Boot hive Boot.hv, in ROM All data under HKEY_LOCAL_MACHINE, HKEY_CLASSES_ROOT, HKEY_USERS. Used during boot only. Changes are propagated to the system hive after boot.
System hive OEM-dependent (usually System.hv) All data under HKEY_LOCAL_MACHINE, HKEY_CLASSES_ROOT, HKEY_USERS. Contains device-wide settings that do not vary for each user.
User hive User.hv All data under HKEY_CURRENT_USER. HKEY_CURRENT_USER is not located under HKEY_USERS. Contains user-specific settings. Each user will have a separate hive that is mounted on logon and unmounted on logoff.

See Also

User Profile Hives

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.