none
请问在wince5.0中如何隐藏某个分区? RRS feed

答案

  • 贴一个我的注册表,在三星2440平台上实现了Hive注册表和隐藏flash分区的功能
    ; HIVE BOOT SECTION
    [HKEY_LOCAL_MACHINE\init\BootVars]
       
    ;==========================================================================
    [HKEY_LOCAL_MACHINE\System\StorageManager\PartitionTable]
        "21"="BINFS"

    [HKEY_LOCAL_MACHINE\System\StorageManager\BINFS]
        "Folder"="BINFS"
        "FriendlyName"="Bin FileSystem"
        "Dll"="binfs.dll"
        "BootPhase"=dword:1                        ;diffnx 0
            ;"MountFlags"=dword:11                    ;diffnx no line
            ; MountFlags:
            ; 0x10 specifies that this file system is to be mounted as an external
            ;      ROM filesystem shadowing the \windows directory
            ; 0x1 specifies that the mountpoint \BINFS is to be hidden
            "MountFlags"=dword:10
         "BootPhase"=dword:0
           
    [HKEY_LOCAL_MACHINE\System\StorageManager\AutoLoad\FlashDrv]
        "DriverPath"="Drivers\\BuiltIn\\FlashDrv"    ;diffnx BlockDevice
        "LoadFlags"=dword:1
      ; "MountFlags"=dword:11                        ;diffnx 11-2
        "BootPhase"=dword:1                            ;diffnx 0
        "Flags"=dword:1000   

    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\FlashDrv]    ;diffnx BlockDevice
        "Prefix"="DSK"
        "Dll"="FLASHDRV.dll"
        "Order"=dword:0
        "Ioctl"=dword:4
        "Profile"="FlashDrv"
        "FriendlyName"="MS Flash Driver"
      ; "MountFlags"=dword:11                        ;diffnx no line
        "BootPhase"=dword:0                            ;diffnx 0
        "Flags"=dword:1000                            ;"Flags"=1000 or with any existing settings.

    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\FlashDrv]
        ;"DefaultFileSystem"="BINFS"  ;ding old is this
        "DefaultFileSystem"="FATFS"
        "PartitionDriver"="mspart.dll"
        "AutoMount"=dword:1
        "AutoPart"=dword:1
        "AutoFormat"=dword:1
     
        "Folder"="NandFlash"
        "Name"="Microsoft Flash Disk"
       
        "MountFlags"=dword:6
        "Ioctl"=dword:4

        "FormatTfat"=dword:1
        "MountAsROM"=dword:0
        "MountHidden"=dword:1          

        "BootPhase"=dword:0
        "Flags"=dword:1000   

    ;---------------------------------------------------------------------
    [HKEY_LOCAL_MACHINE\init\BootVars]
       "SYSTEMHIVE"="\\System.hv"                ;diffnx system.hv
       "PROFILEDIR"="NandFlash"
       "Start DevMgr"=dword:1                ;diffnx 0

    ; END HIVE BOOT SECTION
    2008年11月10日 4:06

全部回复

  • HKEY_LOCAL_MACHINE\System\StorageManager\Profiles下有个MountFlags注册表项,这是它的说明:

     

    Flag Description
    1 Hidden file system.
    2 May contain hive registry.
    4 Mount as root of file system ("\").
    8 Hide ROM file system. (Used only with [4].)

     

    设置成1,应该就可以满足你的要求了。

    2008年9月18日 2:27
    版主
  •  何宗键 写:

    HKEY_LOCAL_MACHINE\System\StorageManager\Profiles下有个MountFlags注册表项,这是它的说明:

     

    Flag Description
    1 Hidden file system.
    2 May contain hive registry.
    4 Mount as root of file system ("\").
    8 Hide ROM file system. (Used only with [4].)

     

    设置成1,应该就可以满足你的要求了。

     

    下面是我在HKEY_LOCAL_MACHINE\System\StorageManager\Profiles 下的所有内容

     

    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles]
    "AutoMount"=dword:00000001
    "AutoPart"=dword:00000000
    "AutoFormat"=dword:00000000
    "MountFlags"=dword:00000001  ;;;;;;;;;;;; 改了这里
    "DefaultFileSystem"=""
    "PartitionDriverName"="MSPART"
    "Folder"="已装入的卷"
    "ActivityEvent"="PowerManager/ActivityTimer/SystemActivity"

    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\CDProfile]
    "Name"="IDE CDROM/DVD Drive"
    "Folder"="光盘驱动器 "
    "DefaultFileSystem"="UDFS"
    "PartitionDriver"=""

    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\CDProfile\PartitionTable]

    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\FlashDrv]
    "Folder"="HardDisk"
    "Name"="Microsoft Flash Disk"
    "DefaultFileSystem"="FATFS"
    "PartitionDriver"="mspart.dll"
    "AutoPart"=dword:00000001
    "MountFlags"=dword:00000002
    "BootPhase"=dword:00000001

    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\FlashDrv\FATFS]
    "MountFlags"=dword:00000002

    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MMC]
    "Name"="MMC Card"
    "Folder"="Storage Card"

    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MSFlash]
    "DefaultFileSystem"="BINFS"
    "PartitionDriver"="mspart.dll"
    "MountAsROM"=dword:00000001
    "MountAsHidden"=dword:00000001
    "Folder"="Flash Disk"
    "Name"="FLASH Disk Block Device"

    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MSFlash\FATFS]
    "MountFlags"=dword:00000002
    "MountAsROM"=dword:00000000

    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\PCMCIA]
    "Name"="PCMCIA/Compact Flash Device"
    "Folder"="存储卡"

    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\SDMemory]
    "Name"="SD Memory Card"
    "Folder"="Storage Card"

    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\USBCDProfile]
    "Name"="USB CDROM/DVD Drive"
    "Folder"="光盘驱动器 "
    "DefaultFileSystem"="UDFS"
    "PartitionDriver"=""

    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\USBCDProfile\PartitionTable]

    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\USBFDProfile]
    "Name"="USB Floppy Disk Drive"
    "Folder"="软盘驱动器 "
    "DefaultFileSystem"="FATFS"
    "PartitionDriver"=""

    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\USBHDProfile]
    "Name"="USB Hard Disk Drive"
    "Folder"="硬盘"

    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\USBHDProfile\FATFS]
    "EnableCacheWarm"=dword:00000000

     

     

    没有看到效果。另外看到说这个是4.2的,5.0以上要用MountHidden,结果用了也没有效果。

     

    2008年9月18日 3:33
  • 或者说有没有别的办法?

    比如说修改explorer代码,过滤掉一些文件夹,但是看了explorer的代码好像也没有找到相关的。

    用SetPartitionAttributes也无法修改到属性。

     

    还有别的办法吗?

    2008年9月23日 5:50
  •  

    可以实现,但是想不更换os的情况下把隐藏的分区显示出来,暂时还没找到方法
    2008年10月31日 2:30
  • 你可以写个应用程序直接读写注册表,按照上面的回复,把相应的注册表键值改了就可以了。

     

    2008年10月31日 3:47
  • 或者这样试试: 在flash上预留一块空间,不属于任何分区, 那么ce的文件系统就无法访问它

    想要对它读写就通过对flash driver下DeviceIOControl, 指定这块区域的起始sector

    这样也算是变相实现一个隐藏的分区,但是没有文件, 呵呵

     

    2008年11月1日 0:03
  • 贴一个我的注册表,在三星2440平台上实现了Hive注册表和隐藏flash分区的功能
    ; HIVE BOOT SECTION
    [HKEY_LOCAL_MACHINE\init\BootVars]
       
    ;==========================================================================
    [HKEY_LOCAL_MACHINE\System\StorageManager\PartitionTable]
        "21"="BINFS"

    [HKEY_LOCAL_MACHINE\System\StorageManager\BINFS]
        "Folder"="BINFS"
        "FriendlyName"="Bin FileSystem"
        "Dll"="binfs.dll"
        "BootPhase"=dword:1                        ;diffnx 0
            ;"MountFlags"=dword:11                    ;diffnx no line
            ; MountFlags:
            ; 0x10 specifies that this file system is to be mounted as an external
            ;      ROM filesystem shadowing the \windows directory
            ; 0x1 specifies that the mountpoint \BINFS is to be hidden
            "MountFlags"=dword:10
         "BootPhase"=dword:0
           
    [HKEY_LOCAL_MACHINE\System\StorageManager\AutoLoad\FlashDrv]
        "DriverPath"="Drivers\\BuiltIn\\FlashDrv"    ;diffnx BlockDevice
        "LoadFlags"=dword:1
      ; "MountFlags"=dword:11                        ;diffnx 11-2
        "BootPhase"=dword:1                            ;diffnx 0
        "Flags"=dword:1000   

    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\FlashDrv]    ;diffnx BlockDevice
        "Prefix"="DSK"
        "Dll"="FLASHDRV.dll"
        "Order"=dword:0
        "Ioctl"=dword:4
        "Profile"="FlashDrv"
        "FriendlyName"="MS Flash Driver"
      ; "MountFlags"=dword:11                        ;diffnx no line
        "BootPhase"=dword:0                            ;diffnx 0
        "Flags"=dword:1000                            ;"Flags"=1000 or with any existing settings.

    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\FlashDrv]
        ;"DefaultFileSystem"="BINFS"  ;ding old is this
        "DefaultFileSystem"="FATFS"
        "PartitionDriver"="mspart.dll"
        "AutoMount"=dword:1
        "AutoPart"=dword:1
        "AutoFormat"=dword:1
     
        "Folder"="NandFlash"
        "Name"="Microsoft Flash Disk"
       
        "MountFlags"=dword:6
        "Ioctl"=dword:4

        "FormatTfat"=dword:1
        "MountAsROM"=dword:0
        "MountHidden"=dword:1          

        "BootPhase"=dword:0
        "Flags"=dword:1000   

    ;---------------------------------------------------------------------
    [HKEY_LOCAL_MACHINE\init\BootVars]
       "SYSTEMHIVE"="\\System.hv"                ;diffnx system.hv
       "PROFILEDIR"="NandFlash"
       "Start DevMgr"=dword:1                ;diffnx 0

    ; END HIVE BOOT SECTION
    2008年11月10日 4:06