Windows error codes appear as hexadecimal gibberish to most users—0x80070005, 0xC0000005, or 0x80004005 flash on screens during crashes, failed installations, or system errors. These codes represent three distinct error systems Microsoft has maintained over decades: Win32 error codes for traditional Windows applications, NTSTATUS codes for the Windows NT kernel and drivers, and HRESULT codes for COM components and modern Windows APIs. The frustration stems not from the codes themselves but from Windows' layered architecture where multiple error systems coexist without a unified interface.
Microsoft includes a powerful diagnostic tool called ERR.exe in the Windows SDK and Windows Driver Kit (WDK) that can decode all three error code types. This command-line utility provides detailed descriptions, severity levels, and facility codes that transform cryptic hexadecimal values into actionable troubleshooting information.
Understanding Windows' Three Error Code Systems
Windows maintains three parallel error code systems, each with its own history and purpose. Win32 error codes date back to Windows 3.1 and use 32-bit values where the most significant bit indicates success (0) or failure (1). These codes appear in traditional desktop applications and system utilities—ERRORACCESSDENIED (0x5) or ERRORFILENOTFOUND (0x2) represent common examples.
NTSTATUS codes originate from the Windows NT kernel and use a different format where the first two bits indicate severity: 0x0 for success, 0x1 for information, 0x2 for warning, and 0x3 for error. The third bit indicates customer code flag, followed by facility codes and the actual error number. STATUSACCESSVIOLATION (0xC0000005) represents a classic NTSTATUS error that appears during memory access violations.
HRESULT codes serve Component Object Model (COM) interfaces and modern Windows Runtime APIs. These 32-bit values contain severity bits, facility codes, and error numbers in a different arrangement. EACCESSDENIED (0x80070005) demonstrates how HRESULT codes often wrap Win32 errors with additional context for COM components.
How ERR.exe Works
ERR.exe operates as a command-line utility that accepts error codes in various formats. The basic syntax is err <errorcode> where the error code can be decimal, hexadecimal (with or without 0x prefix), or symbolic name. The tool automatically detects which error system the code belongs to and provides appropriate decoding.
For Win32 error 0x5, ERR.exe outputs:
# for hex 0x5 / decimal 5:
ERRORACCESSDENIED winerror.h
Access is denied.
For NTSTATUS code 0xC0000005:
# for hex 0xc0000005 / decimal -1073741819:
STATUSACCESSVIOLATION ntstatus.h
The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s.
For HRESULT 0x80070005:
# for hex 0x80070005 / decimal -2147024891:
EACCESSDENIED winerror.h
Access is denied.
The utility shows the symbolic name, header file where it's defined, and a detailed description. For HRESULT codes, it also displays the facility code (7 for FACILITYWIN32) and indicates whether it's a success, information, warning, or error code.
Installation and Access
ERR.exe doesn't ship with standard Windows installations. Users must download either the Windows SDK or Windows Driver Kit from Microsoft's official website. Both packages include ERR.exe in their installation directories.
After installation, ERR.exe typically resides in paths like C:\Program Files (x86)\Windows Kits\10\bin\<version>\x64\err.exe for 64-bit systems or C:\Program Files (x86)\Windows Kits\10\bin\<version>\x86\err.exe for 32-bit systems. The <version> represents the SDK version number, such as 10.0.22621.0 for the Windows 11 22H2 SDK.
Microsoft doesn't include ERR.exe in PATH by default, so users must either navigate to its directory or add it to their system PATH variable. The Windows SDK installation creates Start Menu shortcuts for developer command prompts that automatically set up the environment including PATH to SDK tools.
Practical Applications for Troubleshooting
ERR.exe proves most valuable during system diagnostics when error codes appear without context. During Windows Update failures, error 0x80070005 might appear in logs—ERR.exe reveals this as EACCESSDENIED with FACILITYWIN32, indicating a permissions issue rather than a download problem.
Application crashes often generate NTSTATUS codes in Event Viewer. STATUSACCESSVIOLATION (0xC0000005) points to memory access issues, while STATUSSTACKBUFFEROVERRUN (0xC0000409) indicates security vulnerabilities like buffer overflows.
Driver developers rely on ERR.exe to decode NTSTATUS codes returned by kernel-mode components. The tool shows facility codes that identify which system component generated the error—FACILITYVOLMGR for volume manager errors or FACILITYNETWORK for network-related failures.
System administrators use ERR.exe with scripting to parse log files. A PowerShell script can extract error codes from event logs and pipe them to ERR.exe for batch processing, creating readable reports from technical logs.
Advanced Features and Usage
ERR.exe supports several command-line switches that enhance its functionality. The /win32 flag forces interpretation as a Win32 error code, /ntstatus for NTSTATUS codes, and /hresult for HRESULT codes—useful when automatic detection fails or for educational purposes.
The /range option displays all error codes within a specified range. err /range:0x0 0xFF /win32 shows all standard Win32 error codes, while err /range:0x80000000 0x8000FFFF /hresult displays common HRESULT values.
For symbolic name lookup, ERR.exe accepts names directly. err ERRORACCESSDENIED returns the hexadecimal value and description, enabling reverse lookup from known error names to their numeric codes.
The utility includes help text accessible via err /? that documents all available options and provides examples for different use cases.
Comparison with Alternative Error Lookup Methods
Windows provides other error lookup methods, but each has limitations. The net helpmsg command only handles a subset of Win32 error codes and provides minimal descriptions. The FormatMessage() API function requires programming knowledge and only works within applications.
Online error code databases exist but often lack the comprehensive coverage of Microsoft's official tool. Third-party websites might not include the latest Windows 11 error codes or provide incorrect facility code mappings.
Event Viewer displays error descriptions for logged events but doesn't handle arbitrary error code lookup. The Windows Error Reporting service collects crash data but doesn't offer interactive decoding tools for administrators.
ERR.exe's advantage lies in its completeness—it contains every error code Microsoft has documented across all Windows versions and components, updated with each SDK release to include new error codes from feature updates.
Real-World Troubleshooting Examples
A user encounters error 0x80070002 during a Microsoft Store app installation. ERR.exe decodes this as EFILENOTFOUND with FACILITYWIN32, indicating the installer cannot locate required files rather than a network or permission issue.
During Blue Screen of Death (BSOD) troubleshooting, a memory dump shows stop code 0x0000003B. While not directly an NTSTATUS code, related NTSTATUS values in the dump can be decoded with ERR.exe to identify specific driver or hardware compatibility issues.
Enterprise administrators managing Windows Server deployments might see error 0xC0000142 in application event logs. ERR.exe identifies this as STATUSDLLINITFAILED, pointing to problematic DLL initialization during service startup.
Developers debugging COM component failures receive HRESULT 0x80040154. ERR.exe reveals this as REGDBE_CLASSNOTREG, indicating a missing or unregistered COM class—a specific diagnosis that directs troubleshooting toward registration issues rather than coding errors.
Integration with Development and IT Workflows
Visual Studio developers can configure external tools to run ERR.exe directly from the IDE. Adding ERR.exe as a tool with arguments like $(CurText) allows right-clicking on error codes in source code or debug output for instant decoding.
PowerShell integration enables automated error analysis. A function like Get-ErrorDescription can wrap ERR.exe calls, accepting pipeline input from event logs or application outputs and returning structured objects with error details.
IT departments can deploy ERR.exe as part of standard system images for help desk staff. When users report error codes, technicians can quickly decode them without searching online databases or consulting complex documentation.
System monitoring tools can incorporate ERR.exe decoding for alert enrichment. Instead of showing raw hexadecimal codes in dashboards, monitoring systems can display human-readable error descriptions by calling ERR.exe during alert processing.
Limitations and Considerations
ERR.exe requires the Windows SDK or WDK installation, which occupies several gigabytes of disk space. Users seeking only error lookup functionality must install the entire development kit, though minimal installations are available.
The tool only decodes Microsoft-defined error codes. Third-party applications and drivers might define custom error codes that ERR.exe cannot interpret, though it will attempt to decode them based on format patterns.
Error descriptions come from Microsoft's header files and may use technical language unfamiliar to non-developers. While more informative than raw hexadecimal, some descriptions still require technical knowledge to interpret correctly.
ERR.exe doesn't provide remediation steps—it only decodes error meanings. Users must combine error understanding with troubleshooting knowledge to resolve underlying issues.
Future of Windows Error Reporting
Microsoft continues evolving Windows error systems with each major release. Windows 11 introduced new NTSTATUS codes for security features like virtualization-based security (VBS) and memory integrity. The Windows SDK updates accordingly, with ERR.exe gaining new error code definitions in each version.
The shift toward modern error handling in WinRT and Project Reunion APIs uses HRESULT codes extensively. As Microsoft consolidates Windows APIs, HRESULT becomes increasingly important for both traditional desktop and modern applications.
Microsoft could integrate ERR.exe functionality directly into Windows troubleshooting tools. The built-in Get-Help cmdlet in PowerShell already provides some error decoding, but a comprehensive graphical tool remains absent from standard Windows installations.
For now, ERR.exe remains the definitive tool for understanding Windows' complex error landscape. Its continued inclusion in development kits ensures it stays current with Windows evolution, providing a consistent interface to decode errors across Windows versions from Windows 7 to Windows 11 23H2.
System administrators, developers, and power users who regularly encounter Windows errors should consider installing the Windows SDK primarily for ERR.exe access. The time saved decoding cryptic error codes justifies the installation effort, turning hexadecimal mysteries into solvable problems with clear diagnostic paths.