Windows examples of wildcards used in memory protection exclusions Skip Navigation

Windows
examples of wildcards used in memory protection exclusions

The following examples are based on excluding an executable that is stored in the following path:
C:\Application\TestApp\MyApp\program.exe
Examples
Examples of valid exclusion paths
Relative path exclusion without any wildcards
:
\Application\TestApp\MyApp\program.exe
Exclude program.exe as long as program.exe is located in the  "MyApp" directory in C:\Application
:
C:\Application\**\MyApp\program.exe
Exclude any .exe file that is located in the "MyApp" directory in C:\Application
:
C:\Application\**\MyApp\*.exe
Exclude any executable (regardless of its file extension) as long as it is located in the "MyApp" directory in C:\Application
:
C:\Application\**\MyApp\*
Exclude program.exe as long as it is located in any child directory of the C:\Application\TestApp
:
C:\Application\TestApp\**\program.exe
Exclude program.exe as long as it is located in \Application\TestApp\MyApp\ of the C: drive:
C:\**\Application\TestApp\MyApp\program.exe
Exclude any .exe executable as long as it is located in \Application\TestApp\MyApp\ of the C: drive
:
C:\**\Application\TestApp\MyApp\*.exe
Exclude any executable (regardless of extension) as long as it is located \Application\TestApp\MyApp\ of the C: drive
C:\**\Application\TestApp\MyApp\*
Incorrect use of asterisks in exclusions
Only use a single asterisk (*) to match characters in a folder name or file name. Double asterisks (**) are reserved to match directory paths and cannot be used at the end of an exclusion.
The following is a list of examples in the context of excluding
C:\Application\TestApp\MyApp\program.exe
.  
  • Incorrect:
    C:\Application\TestApp\MyApp**.exe
  • Incorrect:
    C:\Application**\MyApp\program.exe
  • Correct:
    C:\Application\TestApp\MyApp\*.exe
  • Correct:
    C:\Application\TestApp\*\*.exe
  • Correct:
    C:\Application\**\program.exe
Exclusions that are not recommended
Avoid using a double asterisk (**) immediately after a drive letter. For example:
C:\**\program.exe
In this example,
program.exe
is allowed to run from any folder in the
C:
drive. Although this exclusion is technically correct, it would exclude anything in any directory (including child directories) located on the drive.