Skip to contentGo to the directory tree
  1. C:
  2. Windows
  3. AppPatch
FolderRisk: Do not touch

AppPatch C:\Windows\AppPatch

Application compatibility databases (.sdb files) and fix libraries (shims) used by Windows.

Updated on By AltF4 Formation

What it’s for

AppPatch is home to the application compatibility infrastructure: indexed databases in the .sdb format describe the programs that need help. At launch, Windows consults them and applies either a help message (Apphelp) or a fix (Appfix, or “shim”) that hooks API calls so the application can run on the installed Windows version.

What it contains

  • The compatibility databases that ship with Windows, including sysmain.sdb and drvmain.sdb.
  • The fix libraries (shims).
  • A place for custom databases: Microsoft’s documentation uses C:\Windows\AppPatch as an example path for a database installed with sdbinst.exe.
  • A custom database only takes effect once registered with sdbinst.exe; dropping an .sdb file here is not enough.

Risks and best practices

  • Do not delete or replace the system databases: applications that depend on them stop starting properly.
  • Install a compatibility fix with sdbinst.exe or Compatibility Administrator, never by manual copy. To remove it, run sdbinst -u <file>.sdb.
  • Shims are also used for persistence: malware can hook in through a registered .sdb database. Review the installed databases regularly (command below).
  • Windows updates can replace the databases supplied by the system.

Useful commands

Fenêtre de terminal
# Folder content
Get-ChildItem "$env:windir\AppPatch" -Force | Select-Object Name, Length, LastWriteTime
# Custom databases registered on the machine
Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\InstalledSDB' -ErrorAction SilentlyContinue

Report a mistake