Hacking Windows CE!WinCE7有关分区挂载的注册表配置

来源:互联网 发布:js实现动画效果 编辑:程序博客网 时间:2024/05/20 12:50

http://www.cnblogs.com/NorthCan/archive/2011/10/12/2208952.html

WinCE7中关于磁盘分区的“挂载设置(mount settings)”的注册表配置位于[HKEY_LOCAL_MACHINE\SYSTEM\StorageManager\Profiles]注册表子键下。和有关文件系统的其他注册表设置一样,“mount settings”的注册表项放置的位置不同,作用域也不同。放置的层次越深,作用域越窄。深层次的“mount settings”会覆盖浅层次的“mount settings”,这就和c++里面的局部变量会覆盖全局变量道理一样。

  第一个层级:[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles],在这个位置上的“mount settings”对于所有的块存储设备上的文件系统均有效,但是“除了自动加载(Autoload)的文件系统”,这个例外一定不要忘记。

  1

[HKEY_LOCAL_MACHINE\SYSTEM\StorageManager\Profiles]

    "MountFlags"=dword:0

  第二个层级:[HKLM\System\StorageManager\Profiles\<MyProfileName>],在这个位置上的“mount settings”对于指定的块存储设备(MyProfileName)上挂载的所有类型的文件系统实例都有效。

  2

[HKEY_LOCAL_MACHINE\SYSTEM\StorageManager\Profiles\MSFlash]

"MountAsBootable"=dword:1

  意思是对于Flash上挂载的文件系统MountAsBootable1,具体含义后面介绍。

  第三个层级:[HKLM\System\StorageManager\Profiles\<MyProfileName>\<MyFileSystemName >],在这个位置上的“mount settings”对于指定的块存储设备(MyProfileName)上挂载的指定的文件系统(MyFileSystemName)有效。

  3

[HKEY_LOCAL_MACHINE\SYSTEM\StorageManager\Profiles\MSFlash\FATFS]

    "MountAsBootable"=dword:1

    "MountAsRoot"=dword:1

    "MountFlags"=dword:2

  最后一个层级:[HKLM\System\StorageManager\Profiles\<MyProfileName>\<MyPartitionName>],在这个位置上的“mount settings”对于指定的块存储设备(MyProfileName)上挂载的指定分区(MyFileSystemName)有效。

  下面对于注册表配置示例中的MountFlagsMountAsRoot等做简单介绍。其实MountFlags早在WinCE5之后就已经过时了。在新版本的WinCE操作系统中,我们应该使用下面的这些挂载标志(Flag)。

  MountHidden:设置为1隐藏分区,相当于"MountFlags"=dword:1

  MountAsBootable:该文件系统中可能会包含系统注册表,The first mounted partition on the store gets the hive.。设置为1则使能,相当于"MountFlags"=dword:2

  MountAsRoot:设置为1则挂载为根文件系统,相当于"MountFlags"=dword:4

  MountAsROM:设置为1则挂载为外部ROM文件系统。相当于"MountFlags"=dword:10

  MountSystem:设置为1则把所有的文件和子目录视为系统文件,相当于"MountFlags"=dword:20

  MountPermanent:设置为1则本卷(volume)永远不可卸载,相当于"MountFlags"=dword:40

  MountAsNetwork:设置为1则本卷(volume)将接收所有UNC路径,相当于"MountFlags"=dword:80