Site icon Winhelponline

[Fix] Error Status 0xc000012f “Bad Image” When Running a Program

When you run a program in Windows, error 0xc000012f may pop up mentioning that the binary you’re trying to run is corrupted. Here are some examples, with the full error message verbatim:

<filename> is either not designed to run on Windows or it contains an error. Try installing the program again using the original installation media or contact your system administrator or the software vendor for support. Error status 0xc000012f
C:\Windows\System32\schannel.dll is either not designed to run on Windows or it contains an error. Try installing the program again using the original installation media or contact your system administrator or the software vendor. error: 0xc000012f

What does Error Status 0xc000012f mean?

Error 0xc000012f means “Bad image” which denotes that the program’s executable or one of the supporting modules is corrupt. Or there is probably a DLL mismatch and especially seen in programs that use Microsoft Visual C++ Redistributables. In some situations, reinstalling the appropriate version of the Microsoft Visual C++ Redistributables fixes the problem.

In developer’s terms, 0xC000012F means STATUS_INVALID_IMAGE_NOT_MZ, which means the specified image file did not have the correct format. It did not have an initial MZ. It’s possible that the runtime library’s version or bitness are mismatched. For example, the 64-bit version of a DLL may have been accidentally copied to C:\Windows\SysWOW64 directory which is meant to store 32-bit modules.

The error 0xc000012f may occur in any version of Windows, and the fixes below apply to all versions, including Windows 10/11.

[Fix] Error Status 0xc000012f “Bad Image” in Windows

Fix 1: Uninstall & Reinstall the program

Uninstalling and then reinstalling the affected program helps in most cases. Be sure to have the setup file ready.

Right-click Start, click Run. Type appwiz.cpl and click OK. Right-click on the program which is causing the error 0xc000012f “Bad image”, and click Uninstall.

(In Windows 10/11, you can also use Apps & Features via the modern Settings UI to uninstall programs. Click Start, Settings, Apps & Features.)

Note that some vendors offer “clean” uninstaller tools to remove all traces of their program completely. In most cases, the uninstaller tools are more effective than the standard uninstall routine. If the vendor has such a tool, download and run it in addition.

Run the program’s Setup again to reinstall it. If you don’t have one, visit the software vendor’s website and download the program.

Winword.exe Bad Image error and gfx.dll?

Some users have been receiving the “Bad Image” error when launching Microsoft Word (winword.exe). Here’s the full error message:

WINWORD.EXE - Bad Image

C:\Program Files\Microsoft Office\root\Office16\gfx.dll is either not designed to run on Windows or it contains an error. Try installing the program again using the original installation media or contact your system administrator or the software vendor for support. Error status 0xc000012f.

The module name is usually gfx.dll. However, you may see a different module name in the error message dialog. Also, the “bad image” error can be seen when opening Excel, Outlook, or any other Office app.

The Winword.exe bad image error may be caused by one of the following antivirus programs you use:

  • Kaspersky End Point Security (KES)/Kaspersky Security Center/Kaspersky Network Agent.
  • McAfee antivirus software suite.

If disabling or completely uninstalling your antivirus (for testing purposes) fixes the “bad image” error, then you may need to check with the anti-virus software vendor for support. In some cases, adding the executable to the anti-virus exclusion list may work.

Users have indicated that completely removing all traces of McAfee/Kaspersky and Net Agent, then rebooting and running the “Online Repair” of Office installation has resolved the issue that was occurring with Word/Office.

Office installation repair options

Fix 2: Uninstall the Problematic Windows Update

If “Fix 1” doesn’t help, and the “bad image” error occurred only after installing a particular Windows Update, try uninstalling the update.


Fix 3: Repair System Files Corruption Using DISM and SFC

Open an elevated or admin Command Prompt window, and run the following command:

sfc /scannow

The System File Checker will run a thorough check of file integrity and automatically repair all corrupt system files.

If, on the other hand, the System File Checker is unable to repair certain files, it shows the following error:

Windows Resource Protection found corrupt files but was unable to fix some of them. Details are included in the CBS.Log %WinDir%\Logs\CBS\CBS.log.

When analyzing the CBS.log file,  you can find the exact file name(s) which could not be restored from the store:

<date>, Info CSI 00000008 [SR] Cannot 
repair member file [l:34{17}]"Accessibility.dll" of Accessibility, Version = 6.0.6000.16386, pA = PROCESSOR_ARCHITECTURE_MSIL (8), Culture neutral, VersionScope neutral, PublicKeyToken = {l:8 b:b03f5f7f11d50a3a}, Type neutral, TypeName neutral, PublicKey neutral in the store, file is missing

In that case, you need to run the DISM tool to restore the system files to the component store, and then run the System File Checker tool again if necessary. The following is the DISM command-line you need to run:

DISM.exe /Online /Cleanup-image /Restorehealth

For the command to be more effective, a better option would be to run DISM mentioning the Install.wim image file as the source, obtained from the Windows ISO. For detailed instructions, read the article Repair Windows 10/11 Using DISM and SFC.

Restart the computer.


Fix 4: Perform System Restore Rollback

Windows 10 setup turns off System Restore by default. If you’ve already enabled System Restore, and are lucky enough to have a suitable restore point available, you may try a rollback. Be sure to select a System Restore point that was created when the system was stable. (i.e., before the date when the “bad image” error first surfaced.)

Right-click Start, click Run. Type rstrui.exe and click OK. Pick the appropriate restore point, and roll back the system to a previous working state.

For instructions, see the post How to Create a Restore Point and Roll-back to a Previous Restore Point.

Hope one of the above fixes helped you solve the error 0xc000012f (“Bad Image”), without needing to do a clean installation of Windows.

Exit mobile version