When I am attempting to investigate a setup-related failure, I typically end up looking at verbose log files. These log files can contain information about a wide variety of failures, and the failures will typically include some detailed error information (such as the information reported by the GetLastError and FormatMessage APIs or something equivalent to them). In the case of verbose Windows Installer log files, I find the error information in most cases by searching for the text “return value 3” as described in this blog post.
Once I find the error information, I can often recognize the error codes from my past experience. However, there are also a lot of cases where I run into error codes that I do not recognize from past experience. When that happens, I use a tool that helps me translate error codes (normally HRESULT values from function calls) into more readable information. Doing this can help me better understand what the error means, which in turn can help give ideas for what might be causing the error and what types of fixes might help eliminate the error.
Recently, I discovered that the tool that I’ve been using to do error code translation is available on the Microsoft Download Center so that anyone can get a copy and use it themselves. You can find the tool, called Err.exe, at http://www.microsoft.com/downloads/details.aspx?familyid=be596899-7bb8-4208-b7fc-09e02a13696c. This site describes the tool as an Exchange Server Error Code Look-up, but this tool actually aggregates information from 172 sources (header files, etc) from Windows and various other products around Microsoft and is not only useful for Exchange Server issues.
For example, it includes information from corerror.h (a header file that ships with the .NET Framework SDK and Windows SDK) so it can report error information for some types of .NET Framework errors. Here are a couple of specific examples of the output produced by err.exe:
For error code 0x8002802F (described in more detail here):
# for hex 0x8002802f / decimal -2147319761 :
# Function not defined in specified DLL.
# 1 matches found for “0x8002802F”
For error code 0x80070005 (described in more detail here):
# for hex 0x80070005 / decimal -2147024891 :
# Access is denied.
# General access denied error
# 11 matches found for “0x80070005”
In some cases, as shown above for error code 0x80070005, the same error code can map to different meanings in different header files. In those cases, it is sometimes necessary to make an educated guess about which one is the actual error code being generated by a setup error. For example, in most cases, if an error code from winerror.h is listed in the output from err.exe, that one is the actual error code.
It is important to note that Err.exe is not intended to be a diagnostic tool on its own. In other words, it will not be able to tell you how to fix a problem just based on what the error code is. However, in my experience, Err.exe is very useful as a step along the path of attempting to solve a problem because it provides additional information about what an error code means. Once you have a better idea about what an error code means, you can often use this additional information to perform some additional Web searches to learn about possible causes of and workarounds for specific types of errors.