您的位置:首页 > 其它

FBWF

2016-03-14 08:49 639 查看
作者:百度百科

转自:http://baike.baidu.com/link?url=g-Ki5atjhBJ-H1rrdPRvcDx_Mjx0HHmt0uJrB2yFZ1HG4VKSz7ZeE_kYMs_LQMBDgmdCPLQKuYuaOBwVe7cDRa

Windows® XP Embedded Service Pack 2 Feature Pack 2007(以下简称FP2007)推出了一个新的嵌入式特性(EEF),它被称之为File Based Write Filter(FBWF)。这个新的嵌入式特性提供了实体状态设备的无状态保护,并有新的以及提高的维护性特征。通过Target
Designer能够很轻松地对其进行配置,同时,它也能够通过FP2007提供的命令行工具或者应用程序编程接口(API)进行动态的配置。

中文名FBWF推 出FP2007
通 过应用程序编程接口查看FBWFFbwfmgr /displayconfig

目录

1基本信息
简介
综述

2FBWF命令
教程
查看FBWF

FBWF
添加文件夹

基本信息

编辑

简介

嵌入式世界里,设备将允许使用FBWF来为操作系统提供更好的弹性和可靠性,它还为操作系统提供无状态的操作并消除损耗。这些功能主要通过对缓存写入的再定向来完成。缓存可以被认为是存储介质上的一个覆盖图,在这张图形上归纳了磁盘上的内容以及在随机存储器当中的缓存覆盖图,并将他们组合成为一个新的复合视图。当系统重新启动的时候,随机存取存储器(RAM)的覆盖图被清空了,这时操作系统处于原来的状态。我们可以通过下面的这张图表来理解复合视图缓存当中被修改的文件以及新建的文件:
增强的写入过滤器(EWF)是另外一个由Windows XP Embedded提供的写入过滤器,它通过截取对扇区级别的调用来完成写入过滤功能。保护扇区级别的功能让EWF拥有了控制整个文件系统的能力,并通过对扇区的保护达到保护文件系统的目的。然而,EWF盲目地过滤所有对扇区的读写操作,不能直接对文件进行保护。由于FBWF正是针对文件级别设计的,它能够智能地针对文件、文件夹或者任何文件系统数据结构进行过滤,有效地达到了保护文件系统的目的。
开发人员需要告诉FBWF哪些文件或文件夹是需要被保护的,以及哪些是不需要保护的。我们通过一个被称之为“写入列表”的表格来完成这项功能。这张表格允许FBWF绕开目录以及保护卷对文件的控制,通过FBWF直接在磁盘存储介质上进行操作。假设一个用户频繁地下载和保存视频文件,那么设备的存储介质目录将会被配置为“可写入的”,并允许文件在系统重新启动后仍然可以被访问。一些典型的可写入列表包括日志文件和系统事件文件。
FBWF另外一个有用的特性是能够实时提交文件。当操作系统正在运行当中,文件可以被提交到磁盘上的。假设IT部门的主管需要每月更新其数据库中的病毒特性信息。这种情况下,数据库文件往往被保存在磁盘上,并对其进行保护。当数据库更新后,这些病毒特性信息并不能被实时地提交,除非一开始就启用FBWF。这个过程不需要重新启动系统,也无需事先将更新的内容放进可写入列表当中。

综述

综上所述,FBWF的写入保护在嵌入式设备上是文件级别的,这一点不同于增强的写入过滤器(EWF)对嵌入式设备存储器的扇区级别保护。这一点让FBWF可以在新的应用场景下工作,比如针对服务应用文件或是系统文件的保护,而不用对整个磁盘进行盲目保护。

FBWF命令

编辑

教程

开始菜单—〉运行输入CMD,打开命令提示符。之后需要的输入命令

查看FBWF

Fbwfmgr
//查看FBWF的状态。
也可以使用
Fbwfmgr /displayconfig
//查看FBWF的状态。
成功返回:
File-based write filter configuration for the current session:
//当前FBWF状态。
filter state: enabled
overlay cache data compression state: enabled.
//压缩覆盖缓存:开启。
解释一下FBWF拦截的数据放在缓冲区中即覆盖缓存
overlay cache threshold: 1024 MB.
// 覆盖缓存区大小:1024MB。
overlay cache pre-allocation: disabled.
// 覆盖缓存预分配:关闭。开启后会预先分配FBWF的覆盖缓存。
size display: virtual mode.
// 覆盖缓存:虚拟模式。FBWF具有两种模式实际模式和虚拟模式。
例如C驱动器写保护,当前(虚拟模式,系统运行)C驱动器还有128MB的可用空间即表示覆盖缓存还有128MB可用。
protected volume list:
\Device\HarddiskVolume1
//当前受写保护的驱动器,这里用驱动器号表示
HarddiskVolume1=C:
HarddiskVolume2=D:
……
注意:有时候不是按顺序排的。例如:HarddiskVolume3=D:
例如
write through list of each protected volume:
\Device\HarddiskVolume1:
Settings\Temp
Settings\Temporary InternetFiles
\Documents and Settings\Administrator\My Documents
\Documents and Settings\Administrator\桌面
\Documents and Settings\All Users\My Documents
\Documents and Settings\All Users\桌面
\RegfData
\WINDOWS\TEMP
\userdata
//FBWF的豁免写保护列表。在列表中的文件或文件夹不受写保护。\Device\HarddiskVolume3: (none)表示整个驱动器(HarddiskVolume3)又受到写保护
注意:\RegfData文件如果存在在C:下不要将其从豁免写保护列表中手动删除和添加。同样不要尝试添加和删除\fbwf.cfg
File-based write filter configuration for the next session:
//下次启动系统(系统重起后)FBWF状态。
filter state: disabled.
// FBWF在下次启动被关闭。

FBWF

开启:
FbwfMgr /enable
成功返回:
File-based write filter will be enabled on the next reboot.
关闭:
FbwfMgr /disable
成功返回:
File-based write filter will be disabled on the next reboot.
注意:两条命令都重起后生效
添加:
FbwfMgr /addvolume \Device\HarddiskVolume3
//添加\Device\HarddiskVolume3 添加驱动器到FBWF豁免写保护列表,默认列表为空(该驱动器将受到FBWF保护)
也可以这样写
FbwfMgr /addvolume D:
//添加D:驱动器到FBWF豁免写保护列表
正常返回:
Volume \Device\HarddiskVolume3 will be protected after the next reboot.
或者
Volume d: will be protected after the next reboot.
错误返回:
Volume cannot be added. Filter is not enabled for the next session.
//下次FBWF为关闭状态,开启才能使用。
删除:
FbwfMgr /removevolume \Device\HarddiskVolume3 1
//从FBWF豁免写保护列表删除HarddiskVolume3
驱动器 (该驱动器将不再受到FBWF保护)
也可以这样写
FbwfMgr /removevolume d: 1
//从FBWF豁免写保护列表删除d:
驱动器
注意本命令有一个开关
1代表:重起后删除该驱动器豁免写保护列表。
0代表:重起后不删除该驱动器豁免写保护列表。
正常返回:
Volume \Device\HarddiskVolume3 will not be protected after the next reboot.
或者
Volume d: will not be protected after the next reboot.
错误返回:
Volume cannot be added. Filter is not enabled for the next session.
//下次FBWF为关闭状态,开启才能使用。
注意:两条命令都是重起后生效,并且下次重起FBWF为开启状态才能执行。

添加文件夹

4. 向FBWF豁免添加文件夹。
添加文件夹:
FbwfMgr /addexclusion \Device\HarddiskVolume1 \Temp
文件夹添加进FBWF豁免写保护列表。
也可以这样写:
FbwfMgr /addexclusion c: \Temp
//将c:\Temp文件夹添加到FBWF豁免写保护列表。
成功返回:
Path \Temp on volume \Device\HarddiskVolume1
或者
Path \Temp on volume c:
错误返回:
Path cannot be added. Filter is not enabled for the next session.
// 下次FBWF为关闭状态,开启才能使用。
注意:命令中磁盘号和文件夹路径有一个空格。
命令中盘符和文件夹路径有一个空格
5.向FBWF豁免写保护列表(不受FBWF写保护)添加文件。
FbwfMgr /addexclusion \Device\Harddisklume1 \1.txt

也可以这样写
FbwfMgr /addexclusion c: \1.txt
//将c:\1.txt 文件添加进FBWF豁免写保护列表。
成功返回:
Path \1.txt on volume \Device\HarddiskVolume1
或者
Path \1.txt on volume c:
错误返回:
Path cannot be added. Filter is not enabled for the next session.
// 下次FBWF为关闭状态,开启才能使用。
注意:命令中磁盘号和文件路径有一个空格。
命令中盘符和文件路径有一个空格
注意:。
命令重起后生效,并且下次重起FBWF为开启状态才能执行。
6.删除FBWF豁免写保护列表(不受FBWF写保护)的文件夹
FbwfMgr /Removeexclusion \Device\HarddiskVolume1 \Temp
从FBWF豁免写保护列表中删除。
也可以这样写:
FbwfMgr /Removeexclusion c: \Temp
//将c:\Temp文件夹从FBWF豁免写保护列表中删除。
注意:命令中磁盘号和文件夹路径有一个空格。
命令中盘符和文件夹路径有一个空格
7.删除FBWF豁免写保护列表(不受FBWF写保护)的文件
FbwfMgr /Removeexclusion \Device\Harddisklume1 \1.txt

也可以这样写
FbwfMgr /Removeexclusion c: \1.txt
//将c:\1.txt 文件从BWF豁免写保护列表中删除。
注意:命令中磁盘号和文件路径有一个空格。
命令中盘符和文件路径有一个空格
注意:
命令重起后生效,并且下次重起FBWF为开启状态才能执行。
8.将FBWF覆盖缓冲区的文件写入磁盘(将改变的文件写入磁盘保存)
FbwfMgr /commit \Device\Harddisklume1 \1.txt
从FBWF覆盖缓冲区写入磁盘(重起后1.txt不会复位)
也可以这样写
FbwfMgr /commit c: \1.txt
从FBWF覆盖缓冲区写入磁盘(重起后1.txt不会复位)
成功返回:
Changes made to file \1.txt on volume C: are committed.
注意:不支持文件夹和通配符(*.*)。
不支持在FBWF开启后新建的文件。根目录除外。
不支持在FBWF豁免列表的文件,
9.放弃FBWF覆盖缓冲区的文件缓冲。
FbwfMgr /restore \Device\Harddisklume1 \1.txt

//放弃Device\HarddiskVolume1\1.txt 文件在FBWF覆盖缓冲区的内容(1.txt文件会立即复位)
也可以这样写
FbwfMgr /restore c: \1.txt
//放弃Device\HarddiskVolume1\1.txt文件在FBWF覆盖缓冲区的内容(1.txt文件会立即复位)
成功返回:
Changes made to file \1.txt on volume C: are committed.
注意:不支持文件夹和通配符(*.*)。
不支持在FBWF开启后新建的文件。根目录除外。
不支持在FBWF豁免列表的文件,
10.察看详细的FBWF覆盖缓冲使用情况
FbwfMgr / overlaydetail
成功返回:
Overlay detail for each protected volume:
\Device\HarddiskVolume1:
//驱动器号:\Device\HarddiskVolume1:
file
1: Data\Microsoft\Windows\Themes\Custom.theme
cache size 2544, open handle 0
//文件号码、完整路径
//占用缓存大小、是否被打开。
file
2:Data\Microsoft\CryptnetUrlCache\MetaData\60E31627FDA0A46932B0E5948949F2A5
cache size 418, open handle 0
file
3: Data\Microsoft\CryptnetUrlCache\MetaData\A8FABA189DB7D25FBA7CAC806625FD30
cache size 427, open handle 0
file
4: Data\Microsoft\CryptnetUrlCache\Content\60E31627FDA0A46932B0E5948949F2A5
cache size 1133, open handle 0
file
5:name \Documents and Settings\Administrator\Application Data\Microsoft\CryptnetUrlCache\Content\A8FABA189DB7D25FBA7CAC806625FD30
cache size 63014, open handle 0
file
6: name \Documents and Settings\Administrator\Cookies\index.dat
cache size 364, open handle 1
……
file 194: name \WINDOWS\SchedLgU.Txt
cache size 454, open handle 1
file 195: name \WINDOWS\setupapi.log
cache size 48648, open handle 0
file 196: name \WINDOWS\setupact.log
cache size 1264, open handle 0
file 197: name \WINDOWS\Installer\89f0c.msi
cache size 2342814, open handle 0
file 198: name \WINDOWS\Installer\{3B41-9EF1-4B11992E0440}\ARPPRODUCTICON.exe
cache size 16053, open handle 0
file 199: name \WINDOWS\Installer\{3B418E-9EF1-4B11992E0440}\1033.MST
cache size 7471, open handle 0
file 200: name \1.txt
cache size 428, open handle 1
Memory consumed by directory structure: 1864 KB
Memory consumed by file data: 17897 KB
//目录占用缓存大小
//文件占用缓存大小
10.改变FBWF覆盖缓冲容量。
fbwfmgr
/setthreshold 128
//设置FBWF覆盖缓冲容量为128MB(16MB-1024MB)。
成功返回:
Overlay cache threshold will be 128 MB after the next reboot.
注意:命令重起后生效
11.设置是否压缩覆盖缓存
FbwfMgr /setcompression 1
//开启压缩覆盖缓存
成功返回:
Overlay cache will be compressed after the next reboot.
FbwfMgr /setcompression |0
//关闭压缩覆盖缓存
成功返回:
Overlay cache will not be compressed after the next reboot.
注意:开启压缩覆盖缓存后预分配覆盖缓存自动关闭,命令重起后生效
12.设置是否预分配压缩覆盖缓存
FbwfMgr /setpreallocation 1
//开启预分配覆盖缓存
成功返回:
Overlay cache will be pre-allocated after the next reboot.
FbwfMgr /setpreallocation 0
//关闭预分配覆盖缓存
成功返回:
Overlay cache will not be pre-allocated after the next reboot.
注意:开启预分配覆盖缓存后压缩覆盖缓存自动关闭,命令重起后生效。
13.设置FBWF覆盖缓存容量显示是虚拟模式还是实际模式。
FbwfMgr /setsizedisplay 1
//开启虚拟模式。
例如C驱动器被写保护, C驱动器还有128MB的可用空间即表示覆盖缓存还有128MB可用。
成功返回:
Size Display set to virtual mode.
//开启虚拟模式
FbwfMgr /setsizedisplay 0
//开启实际模式
成功返回:
Size Display set to actual mode.
注意:改变模式需要重起后才能生效。
14.显示磁盘有效容量。
fbwfmgr /getvirtualsize c:
//显示C驱动器有效容量。
成功返回:
Volume size in bytes: 2,034,651,136
//总容量大小
Volume free size in bytes: 1,055,412,224
//可用容量大小
15.显示磁盘实际可用容量盘。
fbwfmgr /getactualsize c:
//显示C驱动器实际可用容量大小盘。
成功返回:
Volume size in bytes: 8,587,159,552
//总容量大小
Volume free size in bytes: 7,623,450,624
//可用容量大小
16.获得FBWF控制台帮助
FbwfMgr /?
也可以这样写
FbwfMgr /help
成功返回:
FbwfMgr /? | /help [command] |
/displayconfig | /overlaydetail | /enable | /disable |
/addvolume volumename | /removevolume volumename 1|0 |
/addexclusion volumename file_or_dir_path |
/removeexclusion volumename file_or_dir_path |
/commit volumename file_path | /restore volumename file_path |
/setthreshold threshold | /setcompression 1|0
/setpreallocation 1|0
/setsizedisplay 1|0
/getvirtualsize volumename
/getactualsize volumename
// FBWF控制台的各种命令
To get help for each individual command, for example, "/addvolume",
enter the following command:
FbwfMgr /help /addvolume
// 使用FbwfMgr /help / FBWF控制台命令获得改名的的详细帮助。
补充一下:
如果路径有空格要加""
Device\HarddiskVolume1\ "1 2\1.txt"
表示:
(Device\HarddiskVolume1\1 2\1.txt)
(C:\1 2\1.txt)
1 2这个文件夹有一个空格,不是12。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: