RemoveExclusion Method (Standard 8)

7/8/2014

Review the syntax, members, and examples of the Fbwf.RemoveExclusion WMI method for Windows Embedded 8 Standard (Standard 8).

This method removes a file or directory from the exclusion list for File-Based Write Filter (FBWF).

This topic uses Managed Object Format (MOF) syntax.

Syntax

uint32 RemoveExclusion(
  [in]  string Path
);

Parameters

  • Path
    [in] The full path to a file or directory to remove from the exclusion list. The path must be an absolute path with a drive letter, such as "C:\notes.txt" or "C:\Windows\Temp\".

Return Value

Returns an HRESULT that indicates WMI status, a WMI error, or an error from the EWF and FBWF API libraries.

Example

This example can be used to remove a directory from the exclusion list of an FBWF-protected volume.

Windows PowerShell

$ComputerName = "localhost"   # or "remote-machine-name"
$Class = "Fbwf"
$Path = "E:\Windows\Temp\TestFolder"

$Fbwf = [WmiClass]"\\$ComputerName\ROOT\Microsoft\WriteFilters:$Class"
$Result = $Fbwf.RemoveExclusion($Path)

$ReturnValue = "0x{0:x}" -f $Result.ReturnValue
Write-Host "Method executed with code: " $ReturnValue

VBScript

strComputer = "localhost"   ' or "remote-machine-name"
strNamespace = "\root\Microsoft\WriteFilters"
strClass = "Fbwf=@"
strPath = "D:\Windows\Temp\TestFolder"

On Error Resume Next

Set Fbwf = GetObject("WINMGMTS:\\" & strComputer & _
   strNamespace & ":" & strClass )

Err = Fbwf.RemoveExclusion(strPath)
If Err.Number <> 0 Then
   WScript.Echo "Method exited with error code: 0x" & Hex(Err.Number)
   Wscript.Echo Err.Source & " - " & Err.Description
   WScript.Quit(1)
Else
   WScript.Echo strPath, "removed from exclusion list"
End If

Requirements

Architecture

x64,
x86

MOF

FBWFProvider.mof

Supported Clients

Windows XP Embedded SP3
Windows Embedded Standard 2009
Windows Embedded Standard 7 SP1
Windows Embedded 8 Standard
WEPOS 1.1 SP3
POSReady 2009
Windows Embedded POSReady 7
Windows Fundamentals for Legacy PCs 7

WMI Namespace

root\Microsoft\WriteFilters

WMI Provider

FBWFProvider

See Also

Reference

Fbwf Class