Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
7/8/2014
Review the syntax, members, and examples of the Fbwf.UnprotectVolume WMI method for Windows Embedded 8 Standard (Standard 8).
This method removes File-Based Write Filter (FBWF) protection for a specific volume and optionally removes the exclusion list.
This topic uses Managed Object Format (MOF) syntax.
Syntax
uint32 UnprotectVolume(
[in] string Name,
[in] boolean RemoveExclusion
);
Parameters
Name
[in] The name of the volume from which to remove write filtering. The volume name can be either a drive letter or a device name.Examples: "C:", "\Device\Harddiskvolume1"
- RemoveExclusion
[in] Set to true to clear the exclusion list for the specified volume.
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 write protection on an FBWF-protected volume.
Windows PowerShell
$ComputerName = "localhost" # or "remote-machine-name"
$Class = "Fbwf"
$Volume = "\Device\HarddiskVolume1"
$Fbwf = [WmiClass]"\\$ComputerName\ROOT\Microsoft\WriteFilters:$Class"
$Result = $Fbwf.UnprotectVolume($Volume, $True)
$ReturnValue = "0x{0:x}" -f $Result.ReturnValue
Write-Host "Method executed with return code: " $ReturnValue
VBScript
strComputer = "localhost" ' or "remote-machine-name"
strNamespace = "\root\Microsoft\WriteFilters"
strClass = "Fbwf=@"
strVolumeName = "D:"
On Error Resume Next
Set Fbwf = GetObject("WINMGMTS:\\" & strComputer & _
strNamespace & ":" & strClass)
Err = Fbwf.UnprotectVolume(strVolumeName, False)
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 strVolumeName, "unprotected"
End If
Requirements
Architecture |
x64, |
MOF |
FBWFProvider.mof |
Supported Clients |
Windows XP Embedded SP3 |
WMI Namespace |
root\Microsoft\WriteFilters |
WMI Provider |
FBWFProvider |