Some time ago, I noted that The NET HELPMSG command will decode Windows error codes, at least the simple ones.
Stefan Kanthak pointed out that there’s another built-in program for converting numbers to error messages, and it handles a lot more error numbers and formats than NET HELPMSG
does.
certutil /error 2 certutil /error 0x80070002 certutil /error -2147024894 certutil /error 2147942402 certutil /error -0x7ff8fffe
The first one says
0x2 (WIN32: 2 ERROR_FILE_NOT_FOUND) -- 2 (2) Error message text: The system cannot find the file specified. CertUtil: -error command completed successfully.
The others say the same thing, but with a different error number:
0x80070002 (WIN32: 2 ERROR_FILE_NOT_FOUND) -- 2147942402 (-2147024894) Error message text: The system cannot find the file specified. CertUtil: -error command completed successfully.
So, does it help for yesterday’s blogpost error for which net helpmsg does not work?
Nope. So, I wonder – where do the error messages quoted yesterday come from?
They come up for me. I’m on Windows 11.
Err.exe v6.4.5 reports the following for those two hresults:
C:\Tools>Err_6.4.5.exe 0x80070bfe
# No results found for hex 0x80070bfe / decimal -2147021826
# anonymous HRESULT: Severity: FAILURE (1), Facility 0x7, Code 0xbfe
# for hex 0xbfe / decimal 3070
BC_BLUETOOTH_VERIFIER_FAULT bugcodes.h
SERVICE_UIC_M_MEMORY lmsvc.h
# 2 matches found for “0x80070bfe”
C:\Tools>Err_6.4.5.exe 0x80070bfd
# No results found for hex 0x80070bfd / decimal -2147021827
# anonymous HRESULT: Severity: FAILURE (1), Facility 0x7, Code 0xbfd
# for hex 0xbfd / decimal 3069
EVENT_GATHER_RESTORE_COMPLETE windowssearcherrors.h
# The application was successfully restored.%1
# 1 matches found for “0x80070bfd”
I prefer err.exe, but if you have to stick to the built-in tools, then it sounds like certutil is good way to go. I had no idea that it could look up error codes.
Certutil is also handy if you’re looking for a way to get a hash of a file (to validate a download or the like)
I’m pretty sure I’ve used certutil a lot more often for things completely unrelated to certs than for anything related to them.
Just use hresult.info
All error codes are HRESULTs?
NTSTATUS codes ain’t, for example!
NTSTATUS codes can be encoded as HRESULT values, though. Just like Win32 system error codes. Uniquely identifiable as such, too. While indeed not every error code is in fact an HRESULT, every error code in Windows can be encoded as an HRESULT.
Building upon yesterday’s ONT topic, search your hresult.info site for the error message 0x80070bfe.
https://www.hresult.info/Search?q=0x80070bfe
Results:
Yeah. That’s useful.