Share via


Hive-Based Registry (Windows Embedded CE 6.0)

1/6/2010

The system hive contains system settings that apply to all users. The OEM selects the system hive file name and location. The system hive file is typically named System.hv, but the location may vary.

By default, the system and user hives are separated into two locations, a ROM-based portion and a portion that resides on a file system. When the system starts, it reads the ROM-based version of the hives. Changes to registry data are written to the hive that exists in the file system. Thus, on a cold boot, the portion of the registry that is stored in a file system is essential empty until a write operation occurs.

When the hive-based registry data is loaded for the first time, the ROM-based portion and the portion that resides on a file system are explicitly linked together. An MD5 hash of the ROM file portion is stored in the registry part that resides in a file system. When the registry part from the file system is loaded, Filesys.dll verifies that the ROM portion has not changed. If it has changed, the links between the ROM and file system parts are broken, and Filesys.dll performs a clean boot of the registry by deleting the files and recreating them, based on the initial ROM version.

The flag set by the OEM in IOCTL_HAL_GET_HIVE_CLEAN_FLAG does not affect the cleanup that occurs when the ROM changes. If the ROM changes, the file is always cleaned up, regardless of the flag set in the I/O control.

Note

If access to the ROM is slow for read-only data, the .hv files can be compressed in the FILES section so that they are paged into RAM when used.

See Also

Tasks

Implementing the Hive-Based Registry

Concepts

Registry Types
User Profile Hives
Troubleshooting the Hive-Based Registry
Data Persistence with the Hive-Based Registry