| Previous | Next |
| ERROR_OLD_WIN_VERSION | ERROR_SINGLE_INSTANCE_APP |
ERROR_APP_WRONG_OS
The specified program is not a Windows or MS-DOS program.
ERROR_APP_WRONG_OS is Win32 error 1151 (0x47F). It means the loader or launching component determined that the selected file is not a program for the expected Windows or MS-DOS execution environment. The filename extension may say .exe, but the file contents or selected image do not match the required executable format.
Common causes
- a Linux ELF, macOS Mach-O, script, archive, document, or data file was renamed or selected as an executable
- the file is truncated, replaced by an HTML download page, or otherwise corrupted
- a package points to a resource or helper file instead of the real launcher
- an old or unusual executable format is unsupported by the current environment
- a container, subsystem, or cross-platform launcher was omitted from the command line
Architecture mismatch alone often maps to other loader errors, so do not assume every 1151 result is simply “32-bit versus 64-bit.” Inspect the actual file signature and headers.
What to record
- full resolved path and command line, including shell or launcher involvement
- file size, cryptographic hash, signature status, download source, and package version
- first bytes and parsed executable format, architecture, subsystem, and PE header validity
- whether the same path is a script that requires an interpreter
- security-product or deployment events that may have replaced or quarantined the file
Comparing the hash with the vendor manifest quickly distinguishes a wrong file from a local loader problem. A surprisingly small executable often turns out to be a text error page saved by a failed download.
Diagnostic sequence
- confirm the path after environment-variable expansion, working-directory resolution, and redirection
- identify the file format from content rather than extension
- verify package extraction and transfer integrity
- run the intended interpreter explicitly for scripts
- compare with a known-good copy from the same product build
Avoid repeatedly downloading from an unverified mirror or disabling security controls to force execution. First establish that the expected signed program is present and that the launch mechanism matches its format.
Handling
Replace a corrupted or mispackaged file from a trusted source. Correct the launcher when the artifact is meant for another operating system or requires a compatibility subsystem. If the product genuinely does not support Windows, use the vendor’s Windows build or run it in the intended environment.
Deployment tools should validate executable format and architecture before installation, then fail with the artifact name and hash. That produces a useful packaging error instead of allowing a later generic loader failure.
Related errors
ERROR_OLD_WIN_VERSION means a valid program requires a newer Windows release. ERROR_BAD_EXE_FORMAT indicates a malformed or incompatible executable image. Error 1151 emphasizes that the selected program belongs to the wrong operating-system form or is not a program at all.
Example
An update client follows a proxy error redirect and saves an HTML response under the expected agent.exe name. Launching it returns 1151. Hash and header checks reveal text content, so the fix is to correct download validation and proxy handling rather than change Windows compatibility settings.
References
Looking for a different code? Search another status or error code.