次の方法で共有


Registry Hive ROM Dependency (Windows Embedded CE 6.0)

1/6/2010

The hive-based registry stores collections of registry data in files called hives. The default contents of the registry are stored in hive files in ROM. Registry keys and values that have been added or modified are stored in hive files on a persistent file system. Those hive files contain only changed values and keys. Unchanged data is still referenced from ROM. On the very first startup of the system, the system hive and user hive are empty. As changes are made to the registry, the changed data is added to the hives. This design not only minimizes the size of the hive files that must be saved, but also minimizes the time required to load those files during system startup. As a result, the system starts up faster than it would if the entire registry were stored in the persistent hive files.

However, the fact that data is split between the hive files in the persistent file system and the hive files in ROM means that the system hive and user hives work only in reference to the files in ROM. If the ROM is updated with new hive files, the references from the hives on the persistent file system to the files in ROM are broken. Therefore, if the ROM is updated, the hive files lose their meaning and must be erased. To prevent confusion between old hive files and new ROM contents, a mechanism detects the conflict and erases the persistent hives. A ROM signature is stored in the persistent hive files and compared to the ROM on each startup. If the ROM changes, the older hive files are erased during system startup and re-created clean. This action is automatic and cannot be turned off.

Carrying over existing registry settings when the ROM of a device is updated is not a simple process. You must define which registry settings to maintain and which to overwrite, and then manually make a backup copy of the settings you want to keep. After the device starts up with the default settings in the new ROM, you can manually import the backed-up registry data. There is currently no OS tool for exporting and importing data in this manner, so you must enumerate the data using the registry APIs, and then store it.

You can induce a clean boot without updating the ROM by implementing IOCTL_HAL_GET_HIVE_CLEAN_FLAG.

See Also

Concepts

Hive-Based Registry
Hive-based Registry Setup

Other Resources

IOCTL_HAL_GET_HIVE_CLEAN_FLAG