The “Bad Image” error on Windows 10 and 11 appears when a program or system component tries to load a DLL file that is corrupted, incompatible, or missing, and the fix usually involves repairing or replacing that DLL, running system file checks, or reinstalling the affected application. This guide walks you through the most effective solutions, from quick built-in tools to manual registry and file repairs, so you can get back to work without reinstalling Windows.
What Causes the Bad Image Error?
Windows displays the “Bad Image” error (often as “program.exe – Bad Image” or “The application or DLL file.dll is not a valid Windows image”) when the executable loader detects that a required DLL file is unreadable, tampered with, or built for a different architecture. Common triggers include:
- A corrupted download or incomplete installation of a program.
- A failed Windows Update that left system DLLs in an inconsistent state.
- Malware or a poorly written uninstaller that deleted or overwrote a shared DLL.
- Mixing 32-bit and 64-bit versions of a DLL in the same folder.
- Overclocking or RAM issues that cause files to be read incorrectly (rare but possible).
How to Read the Error Dialog
When the error pops up, it usually names the offending file—for example, MSVCP140.dll or D3DCOMPILER_47.dll. Write down that filename. The dialog also shows which program triggered it. This information tells you whether to focus on the application, the Visual C++ Redistributable, or a system component. If the error appears during startup before you open any program, it’s often a startup service or driver that’s loading a bad DLL.
Fix 1: Run System File Checker and DISM
Windows includes two command-line tools that repair corrupted system files. Run them in order:
- Open Command Prompt as administrator (type “cmd” in Start, right-click, choose “Run as administrator”).
- Type
sfc /scannowand press Enter. This scans all protected system files and replaces corrupted ones with cached copies. It can take 10–20 minutes. - If SFC finds errors but can’t fix them, run
DISM /Online /Cleanup-Image /RestoreHealth. This uses Windows Update to repair the system image. It may take longer and requires internet. - Restart your PC and check if the error is gone.
If the error persists, note the DLL name and proceed to the next fix.
Fix 2: Reinstall the Visual C++ Redistributables
Many “Bad Image” errors involve runtime DLLs like MSVCP140.dll, VCRUNTIME140.dll, or MSVCR100.dll. These are part of the Microsoft Visual C++ Redistributable packages. Games and business software often need specific versions.
- Open Settings > Apps > Installed apps (Windows 11) or Apps & features (Windows 10).
- Search for “Visual C++”. You’ll likely see multiple entries (2015–2022, 2013, 2010, etc.).
- Uninstall all of them, then restart your PC.
- Download the latest supported Visual C++ Redistributable from Microsoft’s official website (the “vc_redist.x64.exe” and “vc_redist.x86.exe” files). Install both the 64-bit and 32-bit versions—even on 64-bit Windows, many programs need the x86 version.
- Restart again and test the program.
Fix 3: Repair the Specific Application
If the error only happens with one program, the application’s installation is likely broken. Reinstalling it often replaces the missing or corrupted DLL.
- Go to Settings > Apps and find the program.
- Click the three-dot menu (Windows 11) or select it (Windows 10) and choose Uninstall.
- Restart your PC, then download a fresh copy from the official source and install it.
- If the program has a “Repair” option (sometimes in its own installer or in Settings > Apps > Modify), try that first—it’s faster than a full reinstall.
Fix 4: Manually Replace the DLL (with Caution)
If you know exactly which DLL is bad and SFC didn’t fix it, you can replace it manually. Only do this if you’re comfortable with file operations, and always back up the original file first.
- Find the DLL on your system. It’s usually in
C:\Windows\System32(64-bit DLLs) orC:\Windows\SysWOW64(32-bit DLLs). For some apps, it’s in the program’s own folder. - Rename the existing file to
filename.dll.bak. - Copy a known-good version of the DLL from another PC running the same Windows version, or extract it from the original installation media. Be extremely careful: downloading DLLs from random websites is a common malware vector. Only use files from the official Microsoft or the software vendor.
- Place the new file in the same folder and restart.
Fix 5: Check for Malware and Clean Boot
Sometimes the error is triggered by a malicious DLL that masquerades as a legitimate file. Run a full scan with Windows Defender (or your third-party antivirus). If the error appears at startup, a clean boot can identify a conflicting service:
- Press Win + R, type
msconfig, and press Enter. - In the Services tab, check “Hide all Microsoft services”, then click “Disable all”.
- In the Startup tab, open Task Manager and disable all startup items.
- Restart. If the error disappears, re-enable services one by one until it returns. That pinpoints the culprit.
Frequently Asked Questions
Why does the error say “not a valid Windows image”?
This means the DLL file is either not a proper Windows executable format, is corrupted, or was built for a different CPU architecture (e.g., a 32-bit DLL in a 64-bit process). Reinstalling the program or the Visual C++ redistributable usually fixes it.
Can I ignore the error and continue using my PC?
You can click “OK” and sometimes the program still runs, but it may crash later or behave unpredictably. It’s best to fix it because the underlying file corruption could affect other programs.
Will reinstalling Windows fix it?
Yes, a clean install will definitely fix it, but it’s a last resort. Try the fixes above first—they solve the majority of cases without losing your data.
Is it safe to download DLL files from the internet?
Generally no. Many sites that offer individual DLL downloads are untrustworthy and may bundle malware. Only get DLLs from official Microsoft packages or the software vendor’s installer.
The error appears for a game, but the game is from Steam/Epic. What should I do?
Use the platform’s “Verify integrity of game files” feature. In Steam, right-click the game, select Properties > Local Files > Verify integrity of game files. This checks every file and re-downloads any that are missing or corrupted.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- Fix Unfortunately App Has Stopped: Step-by-Step
- Restart a Frozen Samsung Galaxy A12
- HomePod Stereo Pair with AirPlay 2 from iPhone
- Fix 0x8e5e0247 Error on Windows
- Pixel & Pixel XL No Sound: Solved?
- How to Edit Playlists on iPhone