What does HRESULT 0x80040164 (CS_E_PACKAGE_NOTFOUND) mean?

 
Previous Next
CAT_E_NODESCRIPTION CS_E_NOT_DELETABLE

CS_E_PACKAGE_NOTFOUND

No package in the software installation data in the Active Directory meets this criteria.

CS_E_PACKAGE_NOTFOUND is the failure HRESULT 2147746148 (0x80040164, signed -2147221148) from winerror.h. AllStat defines it as “No package in the software installation data in the Active Directory meets this criteria.” In practical terms, no directory-backed software package satisfies the class-installation criteria. Interpret it in the context of searching legacy Active Directory software-installation data for a COM class or ProgID.

The high bit in 0x80040164 is set, so this is a failure rather than a success or informational result. Its facility field is 4 (FACILITY_ITF) and its low 16-bit code is 356 (0x0164). Those bit fields classify the value, but they do not identify the failing object by themselves; the native method, object identity, and first producer of CS_E_PACKAGE_NOTFOUND remain essential.

Contract boundary

Understanding CS_E_PACKAGE_NOTFOUND requires this subsystem context: These CS_E values describe the legacy directory-backed COM Class Store. For CS_E_PACKAGE_NOTFOUND, public documentation is limited; the exact owner is the component performing automatic installation or directory lookup, so traces must identify that component rather than assigning the HRESULT to every modern COM activation path.

  • Associate CS_E_PACKAGE_NOTFOUND with one exact operation in automatic class installation or lookup through COM Class Store policy and directory-backed software-installation objects.
  • Confirm that CS_E_PACKAGE_NOTFOUND came from searching legacy Active Directory software-installation data for a COM class or ProgID, rather than from cleanup or a wrapper that ran afterward.
  • Preserve any IErrorInfo, underlying Win32 result, provider message, or callback failure that preceded CS_E_PACKAGE_NOTFOUND; the HRESULT alone should not erase a more specific cause.

Likely cause branches

  • CS_E_PACKAGE_NOTFOUND can result when no published package maps to the requested class.
  • CS_E_PACKAGE_NOTFOUND can result when version, architecture, language, or policy filters exclude every candidate.
  • CS_E_PACKAGE_NOTFOUND can result when directory replication has not delivered the package metadata to the contacted domain controller.

Evidence to preserve

A useful CS_E_PACKAGE_NOTFOUND incident records the requested CLSID or ProgID, directory object DN, package identifier, version, deployment path, domain controller, schema version, policy state, bind result, and object size. For CS_E_PACKAGE_NOTFOUND, also retain the application and component build, architecture, process and thread IDs, COM apartment, operation correlation ID, elapsed time, and the first state-changing event before the failure. When logging CS_E_PACKAGE_NOTFOUND, redact content and credentials while preserving types, lengths, hashes, opaque identities, and lifecycle generations needed to reproduce its contract.

  • For CS_E_PACKAGE_NOTFOUND, record the search criteria and domain controller rather than only the HRESULT.
  • For CS_E_PACKAGE_NOTFOUND, verify package publication and class mappings in the same directory context.
  • For CS_E_PACKAGE_NOTFOUND, compare results across replicated controllers before changing client registration.

Diagnostic sequence

  1. Capture CS_E_PACKAGE_NOTFOUND at the first native return before a wrapper maps it to a generic exception.
  2. Identify the exact object, method, and lifecycle phase involved in searching legacy Active Directory software-installation data for a COM class or ProgID.
  3. Record the search criteria and domain controller rather than only the HRESULT.
  4. Verify package publication and class mappings in the same directory context.
  5. Compare results across replicated controllers before changing client registration.
  6. Reproduce CS_E_PACKAGE_NOTFOUND with one controlled input or state change, and verify that the correction changes the decisive evidence rather than merely hiding the result.

Recovery and retry

Correction. For CS_E_PACKAGE_NOTFOUND, publish or select a matching package, relax only an incorrect criterion, or install the component through a supported modern deployment path. Retry boundary. Retry after directory replication or package publication; immediate retries against unchanged criteria add load without new evidence. Before repeating the CS_E_PACKAGE_NOTFOUND operation, determine whether directory metadata, package staging, or a local installation changed before failure and avoid deleting a directory object whose ownership is not established.

Practical scenario

A client requests an x64 class but only an x86 package is published; adding the correct architecture package resolves lookup without copying registration entries. This isolates CS_E_PACKAGE_NOTFOUND within legacy COM Class Store and Active Directory software-installation metadata and provides a regression test for the stated correction.

Difference from related HRESULTs

REGDB_E_CLASSNOTREG concerns local usable registration; CS_E_PACKAGE_NOTFOUND concerns the legacy directory search for something that could be installed. For CS_E_PACKAGE_NOTFOUND, keep those outcomes separate in exception mappings, telemetry dimensions, user messages, and automated retry policy.

Developer and administrator guidance

For CS_E_PACKAGE_NOTFOUND, treat CS_E results as a legacy automatic-installation contract, preserve directory and policy diagnostics, and fall back to ordinary COM registration only when the product explicitly supports it. Regression coverage for CS_E_PACKAGE_NOTFOUND should include missing packages and classes, duplicate objects, malformed paths, version and schema mismatch, directory outages, administrative limits, and partial publication of metadata.

Operational repair for CS_E_PACKAGE_NOTFOUND must target the evidence-backed owner: involve the Active Directory or software-deployment owner, verify policy and domain-controller evidence, and use the management system that created the package or class-store object. Retain before-and-after traces for CS_E_PACKAGE_NOTFOUND so the change can be attributed and reversed.

References


Looking for a different code? Search another status or error code.