UWF _ Volume. 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 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 HomeWindows 10 Home No
Windows 10 ProWindows 10 Pro No
Windows 10 EnterpriseWindows 10 Enterprise Yes
Windows 10 EducationWindows 10 Education Yes

UWF _ 磁片區UWF_Volume

統一寫入篩選器Unified Write Filter