Execution
Program Compatibility Assistant (PCA)
Program Compatibility Assistant cheat sheet: Windows 11 PcaAppLaunchDic.txt and PcaGeneralDb files, the AppCompatFlags Store key, fields and UTC times.
- Location
- C:\Windows\appcompat\pca\PcaAppLaunchDic.txt
- Proves
- A program was launched from the GUI and when it last ran (Windows 11 22H2+)
- Timestamps
- Last GUI launch per path in PcaAppLaunchDic.txt and PcaGeneralDb record times, text UTC; Store key LastWrite as FILETIME, UTC
- Retention
- One line per path, updated in place; PcaGeneralDb0/1 rotate at about 2 MB (2 to 4 MB of history); plain text, easily edited
- Access
- Administrator for C:\Windows\appcompat\pca (plain copy with robocopy); Store key in NTUSER.DAT, locked while the user is logged on
- Evidence of
- Execution
- Type
- File / file system
- Windows
- Vista / 78 / 8.11011
- KAPE target
- AppCompatPCA
- Velociraptor
- Windows.Triage.Targets:AppCompatPCA
Tools
Compare all toolsWhat it is
The Program Compatibility Assistant (service PcaSvc) watches programs as they start and exit so it can offer compatibility fixes. Two families of traces result:
- Since Windows 11 version 22H2, PcaSvc writes plain-text logs in
C:\Windows\appcompat\pca\, including a dictionary of launched executables with their last execution time in UTC. - On older versions (and still today), it records executables it has examined under the
AppCompatFlags\Compatibility Assistantregistry key of the user.
The Windows 11 files are one of the few simple, human-readable execution artifacts on modern Windows.
Location
| Windows version | Location | Content |
|---|---|---|
| 11 22H2 and later | C:\Windows\appcompat\pca\PcaAppLaunchDic.txt | `path |
| 11 22H2 and later | C:\Windows\appcompat\pca\PcaGeneralDb0.txt, PcaGeneralDb1.txt | Event records (errors, abnormal exits), UTF-16LE |
| 8 / 10 / 11 | NTUSER.DAT\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatibility Assistant\Store | One value per executable path |
| 7 | NTUSER.DAT\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatibility Assistant\Persisted | One value per executable path |
| All | ...\AppCompatFlags\Layers (NTUSER.DAT and SOFTWARE) | Compatibility-mode settings per executable (for example RUNASADMIN) |
What it proves
PcaAppLaunchDic.txt: an executable at that path was launched and when it last ran (UTC).- Only launches that go through the graphical shell are recorded. Research by Sygnia found that programs started from a command line, a scheduled task or remotely with PsExec are not registered, while launches inside an RDP session are.
PcaGeneralDb*.txt: abnormal exits, installer failures and blocked drivers, with product and company metadata; a crashing implant or a failed installer can show up here.Compatibility Assistant\Store: the executable was examined by PCA for that user; treat it as presence with user attribution, and corroborate execution.
Key fields
PcaAppLaunchDic.txt: <full path>|<YYYY-MM-DD HH:MM:SS.fff>
PcaGeneralDb0.txt / PcaGeneralDb1.txt (pipe-delimited):
| Field | Meaning |
|---|---|
| Timestamp | Event time, UTC |
| Record type | 0 installer failed, 1 driver blocked, 2 abnormal process exit, 3 PCA resolve called, 4 unknown |
| Path | Executable path (user names are partly redacted by Windows as %USERNAME% or x characters) |
| Product name, company, version | From the PE version information |
| Program ID | Identifier also used in Amcache |
| Exit code / message | Detail of the event |
Registry Store key: value name = executable path; value data = binary compatibility data (format not publicly documented in full).
Timestamps
| Timestamp | Set when | Format | Pitfalls |
|---|---|---|---|
Last execution (PcaAppLaunchDic.txt) | Each GUI launch of the executable | Text, UTC | Only the latest run is kept per path |
Record time (PcaGeneralDb*.txt) | The PCA event occurs | Text, UTC | Records describe errors and exits, not every launch |
Store key LastWrite | A value is added or updated | FILETIME, UTC | Shared by every value in the key |
Retention and clearing
PcaAppLaunchDic.txtkeeps one line per executable path, updated in place.PcaGeneralDb0.txtis the active log until it reaches about 2 MB, thenPcaGeneralDb1.txttakes over, so roughly two to four megabytes of history are available.- The files are plain text and easy to edit or delete by an administrator; compare with the USN journal for deletions.
Collection
- KAPE target:
AppCompatPCA(the wholeappcompat\pcafolder); addRegistryHivesUserfor the registry keys. - Velociraptor (
Windows.Triage.Targets):AppCompatPCAandRegistryHivesUser. - Built-in:
robocopy C:\Windows\appcompat\pca E:\case\pca /COPY:DAT
type C:\Windows\appcompat\pca\PcaAppLaunchDic.txt
Parsing tools
- Any text editor, or import into Timeline Explorer / a spreadsheet with
|as the delimiter (open thePcaGeneralDbfiles as UTF-16). - Registry Explorer or RegRipper (
appcompatflagsplugin) for theCompatibility AssistantandLayerskeys.
Investigation tips
- Filter
PcaAppLaunchDic.txton user-writable paths (\Downloads\,\AppData\,\Users\Public\) and removable-drive letters. - Because it records GUI launches only, a tool present in Prefetch but missing from PCA was probably started from a script, service or remote session.
- Use record type 2 (abnormal exit) in
PcaGeneralDbto spot crashing malware or tools killed by security software. - On Windows 10 and earlier, fall back to the
Storekey together with BAM/DAM and UserAssist for user-level execution. - A
Layersvalue forcingRUNASADMINon an unusual binary is worth explaining.
Related artifacts
- Amcache.hveAmcache.hve cheat sheet: file and program inventory keys, SHA-1 hashes, PE metadata, timestamps and why an entry alone does not prove execution.
- BAM / DAM (Background Activity Moderator)BAM and DAM cheat sheet: SYSTEM hive keys per Windows 10 build, per-user SIDs, last execution FILETIME, seven-day retention and investigation tips.
- UserAssistUserAssist cheat sheet: NTUSER.DAT GUID keys, ROT13 value names, run count, focus time and last run FILETIME for programs a user launched from Explorer.
- Prefetch Files (.pf)Windows Prefetch cheat sheet: .pf location per version, run count, the last eight run times, referenced files, retention limits and how to parse.
- ShimCache (AppCompatCache)ShimCache (AppCompatCache) cheat sheet: SYSTEM hive location, entry limits per Windows version, ordering, timestamp meaning and execution caveats.
Glossary terms
- Evidence of executionArtifacts that show a program actually ran on a Windows system, as opposed to merely existing on disk, and how strongly each one supports that claim.
- UTC vs local time in Windows artifactsWhy some Windows artifacts record UTC and others local time, and how the TimeZoneInformation registry key helps normalize a forensic timeline.
- NTUSER.DATThe per-user registry hive stored in each Windows profile and loaded as HKEY_CURRENT_USER, rich in user activity and persistence traces.