UWF _ 卷. AddExclusionUWF_Volume.AddExclusion

将一个文件或文件夹添加到 (UWF) 的统一写入筛选器保护的卷的文件排除列表中。Adds a file or folder to the file exclusion list for a volume protected by Unified Write Filter (UWF).

语法Syntax

UInt32 AddExclusion(
    string FileName
);

参数Parameters

FileName 一个字符串,其中包含相对于卷的文件或文件夹的完整路径。FileName A string that contains the full path of the file or folder relative to the volume.

返回值Return Value

返回一个 HRESULT 值,该值指示 wmi 状态wmi 错误Returns an HRESULT value that indicates WMI status or a WMI error.

备注Remarks

必须使用管理员帐户在运行时添加或删除文件或文件夹排除,并且必须重新启动设备以使新的排除生效。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.

重要

不能为以下项添加排除项:You can’t add exclusions for the following items:

  • 卷根。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 驱动程序文件夹。The \Windows\system32\drivers folder on the system volume.
  • 页面文件。Paging files.

但是,你可以排除这些项下的子目录和文件。However, you can exclude subdirectories and files under these items.

要求Requirements

Windows 版本Windows Edition 支持Supported
Windows 10 家庭版Windows 10 Home No
Windows 10 专业版Windows 10 Pro No
Windows 10 企业版Windows 10 Enterprise Yes
Windows 10 教育版Windows 10 Education Yes

UWF _ 卷UWF_Volume

统一写入筛选器Unified Write Filter