FLTMC - CMD


Overview

FLTMC (Filter Manager Control Program) is a command-line utility on Windows operating systems used to manage and control the MiniFilter drivers for the file system’s filter management. The command is typically used by system administrators and developers to troubleshoot file system filters or manage filter drivers, aiding in debugging applications interacting with the file system.

Syntax

The basic syntax for using FLTMC is as follows:

fltmc [command] [args]

Where [command] could be actions like load, unload, attach, detach, filters, instances, etc., and [args] represents the arguments required for a specific command.

Options/Flags

  • load {filter_name}: Loads the specified filter.
  • unload {filter_name}: Unloads the specified filter.
  • attach {filter_name} {volume_name} [instance_name]: Attaches the specified filter to the volume. Optionally specify an instance name.
  • detach {filter_name} {volume_name}: Detaches the specified filter from the volume.
  • filters: Lists all registered filters.
  • instances: Lists all instances of the attached filters.
  • volumes: Lists all volumes and their associated instances of attached filters.

Examples

  1. Load a Filter:

    fltmc load MyAppFilter
    

    This command is used to load a filter driver named ‘MyAppFilter’.

  2. Unload a Filter:

    fltmc unload MyAppFilter
    

    Issuing this command unloads the ‘MyAppFilter’ from the system.

  3. List All Filters:

    fltmc filters
    

    This displays a list of all registered filters on the system.

  4. Attach a Filter to a Volume:

    fltmc attach MyAppFilter C:
    

    Attach ‘MyAppFilter’ to the C: drive.

  5. Detach a Filter from a Volume:

    fltmc detach MyAppFilter C:
    

    This command detaches ‘MyAppFilter’ from the C: drive.

Common Issues

  • Permissions: Users may face permissions errors if they attempt to execute FLTMC without administrative privileges. It is essential to run the command prompt as an administrator.
  • Filter not found: Ensure that the filter name entered is correct. Errors will occur if the specified filter does not exist.

Integration

FLTMC can be integrated with other commands for more comprehensive system management tasks. For example:

for /F "tokens=1" %g in ('fltmc filters') do fltmc unload %g

This script unloads all filters currently loaded on the system by iterating through all filters listed by fltmc filters.

  • sc.exe: This tool is used for managing Windows services and can be utilized to control filter-related services.
  • diskpart: Useful for managing disk partitions which can be combined with filter operations.

For further information, the Windows Dev Center and Microsoft documentation are excellent resources to delve deeper into file system filter drivers and related commands.