0

I want to learn how to breakdown an error such this one. I faced it by applying a Windows Update.

To be clear, I do not need someone to tell me what the meaning is: I already looked for the error itself by googling and I know its meaning "CBS_E_NOT_APPLICABLE" (link).

I also looked in the DISM log; it states: "The package is not applicable to the image." from the log line:

2024-02-15 13:02:43, Error                 DISM   API: PID=4804 TID=1852 The package  is not applicable to the image.  - CAddPackageCommandObject::InternalExecute(hr:0x800f081e)

So it is clear that the update is not applicable, in my case because a later Windows Cumulative Update has already been installed.

What I want is a method to breakdown an error and translate it to a human understandable meaning.

I already looked at the HRESULT error code structure (here and here. I also understood that the "facility" part of the code is 15, that is "Setup API".

What I am not able to decode is the "Code" part, the two bytes on the right of the code that in my case is valued at 0x081e.

How can i get to that "CBS_E_NOT_APPLICABLE" error description? I tried to Google for "setup api" error codes, I looked into the MS-ERREF reference... I did not found any result for that "81e" code.

1 Answers1

0

The easiest way is to use err.exe, the Error Lookup Tool. It'll break any hex or decimal error code, hex with or without the 0x, into the separate parts and tell you which header file it's defined in:

C:\Windows>err 800f081e
# for hex 0x800f081e / decimal -2146498530
  CBS_E_NOT_APPLICABLE                                           cbsapi.h
# the package is not applicable
# 1 matches found for "800f081e"

So in this case you're looking for cbsapi.h in one of the Windows SDKs which is where the 0x81e is defined. That's not a header I have to hand though.

As discussed below it looks like Microsoft have removed the cbsapi.h header from err.exe's index The version I used is dated 2010. It appears to be an internal-only API now, although then it's a bug that Windows Installer is returning internal-only error codes.

Rup
  • 275
  • 5
  • 15