添加蜂窝注册表及永久存储

1、  添加 Hive-based Registry

在 Platform Builder 的“ Catalog ”窗口中,单击打开 Catalog->Core OS->Windows ce devices->File Systems and Data Store->Registry Storage(Choose 1)->Hive-based-based Registry 节点,选中 Hive-based-based Registry 节点,右击选择 Add to Platform

2 、找到下列注册表,设置 "Start DevMgr"=dword:1

; HIVE BOOT SECTION

[HKEY_LOCAL_MACHINE/init/BootVars]

"SYSTEMHIVE"="Documents and Settings//system.hv"// 定义的是防止 system.hv 注册表文件的目录

"PROFILEDIR"="Documents and Settings" // 放置用户文件的文件夹名

"Start DevMgr"=dword:1 // 定义是否在操作系统启动的第一阶段就加载设备管理器,对应 RAM 的注册表,他应该设置为“ 0 ” ,对应蜂窝注册表,它必须设置为“ 1 ”

"DefaultUser"="default"     ;HC HIVE

; END HIVE BOOT SECTION

3 、由于在 Flash 存储器的 FAT 文件系统中放置蜂窝注册表文件,所以操作系统在启动过程中的第一阶段就必须要加载 Flash 驱动,为此,与 Flash 驱动有关的注册表必须位于下列注释之间:

; HIVE BOOT SECTION

……………….

; END HIVE BOOT SECTION

 

即与 Flash 驱动有关的注册表如下表示:

; HIVE BOOT SECTION

[HKEY_LOCAL_MACHINE/System/StorageManager/AutoLoad/FlashDrv]

    "DriverPath"="Drivers//BlockDevice//FlashDrv"

    "LoadFlags"=dword:1

    "MountFlags"=dword:11

    "BootPhase"=dword:0

        "Flags"=dword:1000

 

[HKEY_LOCAL_MACHINE/Drivers/BlockDevice/FlashDrv]

    "Prefix"="DSK"

    "Dll"="FLASHDRV.dll"

    "Order"=dword:0

    "Ioctl"=dword:4

    "Profile"="FlashDrv"

    "FriendlyName"="MS Flash Driver"

    "MountFlags"=dword:11

    "BootPhase"=dword:0

    "Flags"=dword:1000

 

; Bind BINFS to the block driver

[HKEY_LOCAL_MACHINE/System/StorageManager/Profiles/FlashDrv]

    "DefaultFileSystem"="BINFS"

    "PartitionDriver"="mspart.dll"

    "AutoMount"=dword:1

       "AutoFormat"=dword:1

       ;"AutoMount"=dword:0

    "AutoPart"=dword:1

    "MountFlags"=dword:11

    "Folder"="MyARM"

    "Name"="Microsoft Flash Disk"

    "BootPhase"=dword:0

    "Flags"=dword:1000

 

 

[HKEY_LOCAL_MACHINE/System/StorageManager/Profiles/FlashDrv/BINFS]

    "MountFlags"=dword:11

    "Flags"=dword:1000

 

 

 

; Keep FATFS from trying to shadow /Windows

[HKEY_LOCAL_MACHINE/System/StorageManager/Profiles/FlashDrv/FATFS]

    "MountFlags"=dword:2

 

[HKEY_LOCAL_MACHINE/System/StorageManager/FATFS]

    "MountFlags"=dword:0

 

; END HIVE BOOT SECTION

4 、将 [HKEY_LOCAL_MACHINE/System/StorageManager/Profiles/FlashDrv/FATFS]

下的 "MountFlags" 键值设置为 2 ,指出在 Flash 存储器的 FAT 文件心头中保存有系统注册表,即:

[HKEY_LOCAL_MACHINE/System/StorageManager/Profiles/FlashDrv/FATFS]

    "MountFlags"=dword:2

 

 

到此,就完成了添加蜂窝注册表及永久存储

你可能感兴趣的:(添加蜂窝注册表及永久存储)