Skip to content

Latest commit

 

History

History
65 lines (48 loc) · 1.72 KB

uwf-volumeaddexclusion.md

File metadata and controls

65 lines (48 loc) · 1.72 KB
title description MSHAttr ms.assetid author ms.author ms.service ms.subservice ms.date ms.topic
UWF_Volume.AddExclusion
UWF_Volume.AddExclusion
PreferredSiteName:MSDN
PreferredLib:/library/windows/hardware
75c1cd6c-2101-499a-856e-66eadb43ec05
TerryWarwick
twarwick
windows-iot
iot
05/20/2024
article

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 Yes

Related topics