Inventory: what the agent reads, and how
Inventory shows an app twice, misses a bundle install, lists a Store app as a winget package, or winget on a fenced machine does not recognise software Attestree never installed, and you want to know how the agent reads what is installed.
UPDATED
Adoption and the CVE index both start from inventory, so its accuracy decides what Attestree can manage and what it can warn you about. This page says what the agent reports and the rules it follows to read it.
What a report holds
At each check-in the agent reports what is installed on the endpoint: the winget, Chocolatey and Scoop packages, the MSIX packages Windows lists, and every Add/Remove Programs entry, machine-wide and per user. Inventory is presence: what is installed, which version and in which scope, never how often or how long anything is used. On /inventory all of it is one list across managers; the endpoint page shows one endpoint’s share.
Each Add/Remove Programs entry carries, from these agent versions on:
- its Publisher (agent 0.239.0), which
/inventory’s search also matches since platform 0.249.1; - its installer family, MSI, EXE or portable (agent 0.249.0), so the server can name an installer of the same family for an update;
- a machine-wide MSI’s UpgradeCode (agent 0.251.0), which adoption uses to match a copy whose ProductCode the catalog never saw.
A per-user row belongs to the user who has it. Two people with their own copy of one app each keep their row (since agent 0.242.1), and names stay masked on the endpoint page until someone reveals them. When the server refuses an endpoint’s whole report, the endpoint shows an inventory rejected badge and its page says since when and why.
The rules that keep it accurate
- Bundles. A Burn bundle, such as PowerToys or Jabra Direct, registers a visible entry and a hidden inner MSI with the same name. Since agent 0.238.0 inventory keeps the visible entry, so the app shows up as installed.
- Store and MSIX apps. An installed MSIX package is mapped to a winget package only when the package declares that MSIX’s family name (since platform 0.230.0) and the downloaded winget index confirms the match (since 0.232.0). Until then it stays listed as a Store app. App companions and Windows’ own MSIX packages, such as VS Code’s AppX companion, are no longer counted as the real app.
- Copies in the SYSTEM profile. A per-user portable app that landed only in the SYSTEM profile, where no user can run it, is left in place and not counted in inventory (since platform 0.224.0). Since agent 0.242.0 the same holds for a hidden portable copy in the SYSTEM profile beside a declared Inno Setup or MSI installer, and the agent does not install a machine-wide copy beside it.
- WebView2. winget can tie the WebView2 Runtime to the Edge browser’s uninstall entry once it installs or upgrades it, and from then on reports Edge’s version for it. Since agent 0.252.0 the agent reads WebView2’s version from its own entry, so it stops repeating an upgrade that already happened. It also never uninstalls or downgrades WebView2, because winget’s uninstall would run the Edge browser’s uninstaller; installs and upgrades still run.
- Reads that fail. Since platform 26.11.501 a cycle whose read of what is installed failed shows on the endpoint’s timeline as “observed read failed”, with the reason. An empty winget read after a non-empty one counts as degraded and keeps the last known state, so the server never replaces an endpoint’s whole winget set from such a read, and never auto-adopts from a read that saw only Add/Remove Programs. A Chocolatey or Scoop part the agent could not read reads as unread, not as absent.
- Short names. Since agent 26.11.700 a per-user portable app whose name is one or two letters, such as jq, appears as installed.
- Capitalisation. A report made while the subscription check briefly failed lands on the package’s existing catalog entry instead of creating a second one with different capitalisation (since platform 0.231.0).
Copies Attestree did not install, on a fenced endpoint
On a fenced endpoint winget answers winget list and winget upgrade --all from your attested feed, and it ties an installed copy to a package by correlation: for an MSI it asks by the copy’s own ProductCode, otherwise by the key name of its uninstall entry. The feed answers so that a vendor MSI nobody installed through Attestree is still recognised:
- The MSI’s own identity. Since platform 0.249.1 the feed describes each vendor MSI by the UpgradeCode and ProductVersion read from its own attested bytes, and so do derived MSIs and zips holding one nested MSI. A code two packages claim is never served.
- ProductCode binds one package. A correlation by an MSI copy’s ProductCode binds the one package that owns that code, or none, so
winget upgrade --allties an untracked copy to its package. - Exact names win. Since platform 0.248.0 a correlation by name binds the package whose id or name equals the keyword, never a sibling that only contains it. Before, the Edge browser’s entry also matched the WebView2 Runtime, winget bound the browser to WebView2, and upgrading the browser by id failed.
- One retry. Since agent 0.249.1, when winget answers “not found” to an upgrade of an MSI copy it did not install, and the endpoint has a machine-wide MSI at the version being upgraded from, the agent retries once as the same pinned install.
The COM-first read
By default the agent reads winget’s view of the endpoint by running winget list through the installer shim and parsing its output. A deployment can switch every agent to read through winget’s COM interface first, with Wep:Agents:ReadMode:ComPrimaryRead set to true (as an environment variable, Wep__Agents__ReadMode__ComPrimaryRead), and a restart. It ships off, and it applies to the whole fleet at once, not per ring.
With it on, the agent uses the COM read unless that read is unavailable or degraded, for example with no interactive session, a stale answer or a partial failure. Then it falls back to the winget list read for that cycle. The setting is listed with its live value on the console’s deployment config page.
Where this stops
- Presence only. No usage, run time or frequency is recorded.
- What the agent can read. Software that registers in none of Add/Remove Programs, winget, Chocolatey, Scoop or the MSIX package list is invisible to inventory.
- Store apps wait for the index. Without a downloaded winget index, every MSIX app stays a Store app.
- SYSTEM-profile copies are not removed. They are left in place and not counted.
- MSI only, for the feed’s matching. An EXE installer that registers no MSI codes is matched by name, as winget itself does.
- Older agents. Publisher, installer family, UpgradeCode, the bundle rule and the WebView2 rule each need the agent version named above.