UWF_Volume.AddExclusion

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

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.

Important

You can’t add exclusions for the following items:

  • The volume root. For example, C: or D:.
  • The \Windows folder on the system volume.
  • The \Windows\System32 folder on the system volume.
  • The \Windows\system32\drivers folder on the system volume.
  • Paging files.

However, you can exclude subdirectories and files under these items.

Requirements

Windows Edition Supported
Windows Home No
Windows Pro No
Windows Enterprise Yes
Windows Education Yes
Windows IoT Enterprise Yea