写入筛选器排除项Write filter exclusions

你可以将受保护卷上的特定文件或文件夹添加到文件排除列表中,以排除 UWF 筛选这些文件和文件夹。You can add specific files or folders on a protected volume to a file exclusion list to exclude those files and folders from being filtered by UWF. 当某个文件或文件夹位于某个卷的排除列表中时,所有写入该文件或文件夹的操作将绕过 UWF 筛选,并直接写入受保护的卷,并在设备重新启动后保持。When a file or folder is in the exclusion list for a volume, all writes to that file or folder bypass UWF filtering, and are written directly to the protected volume and persist after the device restarts.

必须使用管理员帐户在运行时添加或删除文件或文件夹排除,并且必须重新启动设备以使新的排除生效。You must use an administrator account to add or remove file or folder exclusions during run time, and you must restart the device for new exclusions to take effect.

重要

不要为以下项添加排除项:Don't add exclusions for the following:

  • \Windows\System32\config\DEFAULT
  • \Windows\System32\config\SAM
  • \Windows\System32\config\SECURITY
  • \Windows\System32\config\SOFTWARE
  • \Windows\System32\config\SYSTEM
  • \Users\<User Name>\NTUSER.DAT
  • \Windows\BOOTSTAT.DAT
  • <System Drive>\EFI\Microsoft\Boot\BOOTSTAT.DAT
  • <System Drive>\Boot\BOOTSTAT.DAT

此外,请不要为以下项添加排除项:Also, don't add exclusions for the following:

  • 卷根。The volume root. 例如,C:或 d:For example, C: or D:.
  • \Windows系统卷上的文件夹。The \Windows folder on the system volume.
  • \Windows\System32系统卷上的文件夹。The \Windows\System32 folder on the system volume.
  • \Windows\System32\Drivers系统卷上的文件夹。The \Windows\System32\Drivers folder on the system volume.
  • 页面文件。Paging files.

为这些项中的任何一项添加排除项不受支持,可能导致不可预知的结果。Adding an exclusion for any of these items is unsupported and may lead to unpredictable results. 可以排除这些位置下的子目录和文件。It's OK to exclude subdirectories and files under these locations.

文件夹在添加到排除列表之前需要存在。Folders need to exist prior to adding them to the exclusion list.

不能将文件或文件夹从受保护的位置重命名或移动到不受保护的位置,反之亦然。You cannot rename or move a file or folder from a protected location to an unprotected location, or vice versa. 当写入筛选器处于活动状态,并且您尝试在 Windows 资源管理器中删除排除的文件或文件夹时,系统将尝试将文件或文件夹移动到回收站。When write filters are active and you attempt to delete an excluded file or folder in Windows Explorer, the system attempts to move the file or folder to the Recycle Bin. 这会导致错误,因为不能将未筛选的文件移动到受写入筛选器保护的位置。This causes an error, because you cannot move files that are not filtered to a location that is write filter protected.

若要解决此情况,可以禁用回收站。To work around this, you can disable the Recycle Bin. 或者,用户可以按 Ctrl + Shift,然后单击该文件以直接删除排除的文件,绕过回收站,或者用户可以直接从命令提示符中删除排除的文件。Alternatively, the user can press Ctrl+Shift and then left-click on the file to directly delete the excluded file, bypassing the Recycle Bin, or the user can delete the excluded file directly from a command prompt. 要使新的排除生效,你必须重新启动设备。You must restart the device for new exclusions to take effect.

虚拟硬盘 (VHD) 文件排除Virtual Hard Disk (VHD) file exclusions

当你在 VHD 启动磁盘上部署 azure 的 Windows 10 Enterprise 映像时,你可以通过为 VHD 文件添加文件排除来保护包含 VHD 文件的卷,然后再启用 UWF 并保护卷。When you deploy a Windows 10 Enterprise image with UWF on a VHD boot disk, you can protect the volume that contains the VHD file by adding a file exclusion for the VHD file before enabling UWF and protecting the volume.

在管理员命令提示符下为 VHD 文件添加文件排除:To add a file exclusion for the VHD file at an administrator command prompt:

uwfmgr.exe file add-exclusion <drive containing VHD file>:\<path to VHD file>\<VHD file name>.vhd

例如:For example:

uwfmgr.exe file add-exclusion E:\VHD\test.vhd

注册表排除项Registry exclusions

你可以将特定的注册表项添加到排除列表中,以排除 UWF 筛选这些密钥。You can add specific registry keys to an exclusion list to exclude those keys from being filtered by UWF. 当注册表项位于排除列表中时,对该注册表键的所有写入都会绕过 UWF 筛选,直接写入注册表并在设备重启后仍然保留。When a registry key is in the exclusion list, all writes to that registry key bypass UWF filtering and are written directly to the registry and persist after the device restarts.

必须使用管理员帐户在运行时添加或删除注册表排除项,并且必须重新启动设备以使新的排除生效。You must use an administrator account to add or remove registry exclusions during run time, and you must restart the device for new exclusions to take effect.

如果你排除某个注册表项,则还会排除其所有子项的筛选。If you exclude a registry key, all its subkeys are also excluded from filtering. 只能在以下注册表项下排除注册表子项:You can exclude registry subkeys only under the following registry keys:

  • HKEY\LOCAL\MACHINE\BCD00000000
  • HKEY\LOCAL\MACHINE\SYSTEM
  • HKEY\LOCAL\MACHINE\SOFTWARE
  • HKEY\LOCAL\MACHINE\SAM
  • HKEY\LOCAL\MACHINE\SECURITY
  • HKEY\LOCAL\MACHINE\COMPONENTS

重要

不要为以下项添加排除项:Don't add exclusions for the following:

  • HKLM\SECURITY\Policy\Secrets\$MACHINE.ACC

备注

UWF 自动排除某些注册表项被筛选掉。UWF automatically excludes certain registry keys from being filtered. 这些注册表项主要与 UWF 配置设置相关,不能从排除列表中删除。These registry keys are primarily related to UWF configuration settings and cannot be removed from the exclusion list.

有关常见注册表排除项的详细信息,请参阅 常见写入筛选器排除项。For more information about common registry exclusions, see Common write filter exclusions.

常见写入筛选器排除项Common write-filter exclusions

某些服务和功能会将信息写入设备的永久卷,并预期该信息会在设备重新启动时出现。Some services and features write information to a device’s persistent volume, and expect that information to be present across device restarts. 你可能需要将写入筛选器配置为允许特定文件和注册表排除项,以便这些服务和功能正常工作。You may need to configure your write filter to allow for specific file and registry exclusions in order for these services and features to work correctly.

本主题列出了在启用写入筛选器的情况下,有助于使某些常见服务和功能正常工作的注册表和文件排除项。This topic lists registry and file exclusions that can help enable some common services and features to work correctly when write filters are enabled.

如果除了使用 UWF,还运行任何防病毒软件或安全软件,请咨询你的防病毒供应商,以获取有关如何在 UWF 环境中配置其解决方案的建议。If you are running any antivirus or security software in addition to UWF, please consult with your antivirus vendor for advice on how to configure their solution in a UWF environment. 可能需要为签名或更新文件夹添加 UWF 排除项。You may need to add a UWF exclusion for the signature or update folder.

客户体验改善计划 (CEIP)Customer Experience Improvement Program (CEIP)

当你选择参与 CEIP 时,你的计算机或设备会自动向 Microsoft 发送有关你如何使用特定产品的信息。When you choose to participate in the CEIP, your computer or device automatically sends information to Microsoft about how you use certain products. 你的计算机或设备的信息与其他 CEIP 数据相结合,以帮助 Microsoft 解决问题,并改善客户最常使用的产品和功能。Information from your computer or device is combined with other CEIP data to help Microsoft solve problems and to improve the products and features customers use most often.

CEIP 数据存储在具有 sqm 文件扩展名的文件中。CEIP data is stored in files that have a .sqm file name extension. 若要确保在启用了写入筛选器的设备上提供 sqm 文件中的 CEIP 数据,可以为该 sqm 文件和文件夹添加文件和文件夹排除项。To make sure that the CEIP data in the .sqm files is available on a device that has write filters enabled, you can add file and folder exclusions for the .sqm files and folders.

若要在设备上查找 sqm 文件和文件夹,请使用文件资源管理器搜索 sqm 文件。To locate the .sqm files and folders on your device, search for .sqm files by using File Explorer. 或者,在驱动器根目录下具有管理员权限的命令提示符下,键入以下命令以获取设备上的 sqm 文件列表:Alternately, at a command prompt with administrator rights at the root of the drive, type the following command to obtain a list of .sqm files on the device:

dir *.sqm /s

为设备上的任何 sqm 文件添加所需的文件和文件夹排除项。Add file and folder exclusions as required for any .sqm files located on your device.

为以下注册表项添加注册表排除项:Add registry exclusions for the following registry keys:

  • HKEY _ 本地 _ 计算机 \ 软件 \ 策略 \ Microsoft \ SQMClient \ Windows \ CEIPEnableHKEY_LOCAL_MACHINE\Software\Policies\Microsoft\SQMClient\Windows\CEIPEnable

  • HKEY _ 本地 _ 计算机 \ Software \ Microsoft \ SQMClient \ Windows \ CEIPEnableHKEY_LOCAL_MACHINE\Software\Microsoft\SQMClient\Windows\CEIPEnable

  • HKEY _ 本地 _ 计算机 \ Software \ Microsoft \ SQMClient \ UploadDisableFlagHKEY_LOCAL_MACHINE\Software\Microsoft\SQMClient\UploadDisableFlag

后台智能传送服务 (BITS)Background Intelligent Transfer Service (BITS)

后台智能传输服务 (BITS) 在客户端和服务器之间下载或上载文件,并提供与传输相关的进度信息。Background Intelligent Transfer Service (BITS) downloads or uploads files between a client and server and provides progress information related to the transfers.

添加以下文件夹和文件的文件排除项:Add file exclusions for the following folders and files:

  • % ALLUSERSPROFILE% \Microsoft \ 网络 \ 下载程序% ALLUSERSPROFILE%\Microsoft\Network\Downloader

为以下注册表项添加注册表排除项:Add registry exclusions for the following registry keys:

  • HKEY _ LOCAL _ MACHINE \ Software \ Microsoft \ Windows \ CurrentVersion \ BITS \ StateIndexHKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\BITS\StateIndex

Windows 资源管理器Windows Explorer

当写入筛选器处于活动状态,并且您尝试在 Windows 资源管理器中删除排除的文件或文件夹时,系统将尝试将文件或文件夹移动到回收站。When write filters are active and you attempt to delete an excluded file or folder in Windows Explorer, the system attempts to move the file or folder to the Recycle Bin. 这会导致错误,因为不能将未筛选的文件移动到受写入筛选器保护的位置。This causes an error, because you cannot move files that are not filtered to a location that is write filter protected.

若要解决此情况,可以禁用回收站。To work around this, you can disable the Recycle Bin. 或者,用户可以按 Ctrl + Shift,然后单击该文件以直接删除排除的文件,绕过回收站,或者用户可以直接从命令提示符中删除排除的文件。Alternatively, the user can press Ctrl+Shift and then left-click on the file to directly delete the excluded file, bypassing the Recycle Bin, or the user can delete the excluded file directly from a command prompt.

网络Networks

在设备上使用写入筛选器时,可以添加文件和注册表排除项,使设备能够加入有线和无线网络。When you use write filters on your device, you can add file and registry exclusions to enable your device to join wired and wireless networks. 设备上可能需要以下文件和注册表排除项。The following file and registry exclusions may be required on your device.

客户端组策略对象 (GPO) 注册表项:Client Group Policy Object (GPO) registry keys:

  • 无线: HKEY _ 本地 _ 计算机 \ 软件 \ 策略 \ Microsoft \ Windows \ 无线 \ GPTWirelessPolicyWireless: HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Wireless\GPTWirelessPolicy
  • 有线: HKEY _ 本地 _ 计算机 \ 软件 \ 策略 \ Microsoft \ Windows \ WiredL2 \ GP _ 策略Wired: HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WiredL2\GP_Policy

GPO 策略文件:GPO policy files:

  • 无线: C: \ Windows \ wlansvc \ 策略Wireless: C:\Windows\wlansvc\Policies
  • 有线: C: \ Windows \ dot2svc \ 策略Wired: C:\Windows\dot2svc\Policies

接口配置文件注册表项:Interface profile registry keys:

  • 无线: HKEY _ 本地 _ 计算机 \ 软件 \ Microsoft \ wlansvcWireless: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\wlansvc
  • 有线: HKEY _ 本地 _ 计算机 \ 软件 \ Microsoft \ dot3svcWired: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\dot3svc

接口策略文件:Interface policy file:

  • 无线: C: \ ProgramData \ Microsoft \ wlansvc \ 配置文件 \ 接口 \ {* < Interface > GUID***} \ {*** < Profile > guid*} .xmlWireless: C:\ProgramData\Microsoft\wlansvc\Profiles\Interfaces\{<Interface GUID>}\{<Profile GUID>}.xml
  • 有线: C: \ ProgramData \ Microsoft \ dot3svc \ 配置文件 \ 接口 \ {* < Interface > GUID***} \ {*** < Profile > guid*} .xmlWired: C:\ProgramData\Microsoft\dot3svc\Profiles\Interfaces\{<Interface GUID>}\{<Profile GUID>}.xml

服务注册表项:Services registry keys:

  • 无线: HKEY _ 本地 _ 计算机 \ 系统 \ CurrentControlSet \ services \ WlansvcWireless: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Wlansvc
  • 无线: HKEY _ 本地 _ 计算机 \ 系统 \ CurrentControlSet \ services \ WwanSvcWireless: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\WwanSvc
  • 有线: HKEY _ 本地 _ 计算机 \ 系统 \ CurrentControlSet \ services \ dot3svcWired: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\dot3svc

重要

文件夹在添加到排除列表之前需要存在。Folders need to exist prior to adding them to the exclusion list.

夏令时 (DST) Daylight saving time (DST)

你可以添加以下注册表排除项,以在设备上保存夏令时 (DST) 设置。You can add the following registry exclusions to persist daylight saving time (DST) settings on your device.

  • HKEY _ 本地 _ 计算机 \ 软件 \ Microsoft \ Windows NT \ CurrentVersion \ 时区HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones

  • HKEY _ 本地 _ 计算机 \ 系统 \ CurrentControlSet \ 控制 \ TimeZoneInformationHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation

统一写入筛选器Unified Write Filter

服务 UWF 保护的设备Service UWF-protected devices

统一写入筛选器 WMI 提供程序参考Unified Write Filter WMI provider reference