FacebookTwitterLinkedIn

How to Fix "Error Status 0xc000012f" (Bad Image) on Windows 11

How to Fix “Error Status 0xc000012f” (Bad Image) on Windows 11

If you run a program and get an “Error Status 0xc000012f” message, it usually means that your system doesn’t have the necessary Microsoft Visual C++ Redistributable files. Check out the methods below, which will help you fix this error.

Error Status 0xc000012f

ApplicationName.exe – Bad Image

C:\Windows\system32\FileName.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.

“Error Status 0xc000012f” indicates a bad image, which means that the program’s executable or one of the supporting modules is corrupt. 0xc000012f stands for STATUS_INVALID_IMAGE_NOT_MZ, which means that the image file does not have the correct format.

This error can occur when trying to run Microsoft Office tools, such as Excel, Outlook, OneDrive, and Teams, as well as other programs, such as Origin, Steam, and AVG Antivirus. Error 0xc000012f is particularly prone to occur when launching Origin and Steam games.

What Causes “Error Status 0xc000012f”?

Bad image file. This error usually occurs when the image file is in the wrong format, which is particularly common in programs that rely on Microsoft Visual C++. Error 0xc000012f usually occurs because a system doesn’t have Microsoft Visual C++ Redistributable files, which are prerequisites of the programs.

Corrupted files. Corrupted, missing, or incompatible DLL files or executables can also trigger this error. Re-registering DLL files may fix this error.

DLL mismatch. The Visual C++ Redistributable runtime libraries version or bitness may be mismatched.

Malware on the system. In rare cases, this error starts occurring if the computer has been infected will malware. Therefore, consider scanning it with an antimalware program. We invite you to scan your system with Combo Cleaner.

To fix the 0xc000012f error, try the fixes below. However, before trying any of our fixes, reinstall the affected program, which often helps resolve the issue.

How to Fix Bad Image - Error Status 0xc000012f

Table of Contents:

Method 1. Run the Deployment Image & Servicing Management (DISM) and System File Checker (SFC) Scans

The Deployment Image Servicing and Management (DISM) is a command-line tool designed to prepare, modify, and repair system images, while the System File Checker (SFC) is designed to identify corrupted or missing system files and download new files from Microsoft.

The SFC /ScanNow command scans all protected system files and replaces corrupted or missing files with a cached copy found in a compressed folder found in %WinDir%\System32\dllcache.

1. Hold down Windows+R keys to open Run.

Type in CMD and hold down Ctrl+Shift+Enter keys to open the elevated Command Prompt

2. In the Run dialog box, type in CMD and hold down Ctrl+Shift+Enter keys to open the elevated Command Prompt.

Run DISM /RestoreHealth and SFC /ScanNow commands

3. In the Command Prompt window, type in DISM /Online /Cleanup-Image /RestoreHealth and press Enter.

4. Then, type in SFC /ScanNow and press Enter.

5. Close the Command Prompt and restart your PC.

[Back to Table of Contents]

Method 2. Install/Repair Microsoft Visual C++ Redistributable

You may get “Error Status 0xc000012f” when the software you’re trying to run requires Visual C++ Redistributable libraries. Installing or reinstalling Visual C++ Redistributable will fix the error in most cases.

Download vc_redist.x86.exe and vc_redist.x64.exe

1. Open your web browser and go to the Visual C++ Redistributable download page.

2. Under Visual Studio 2015, 2017, 2019, and 2022, click the download links for vc_redist.x86.exe and vc_redist.x64.exe.

Go to your Downloads folder

3. Then, navigate to your Downloads folder.

Accept the license agreement and click Install

4. Open vc_redist.x86.exe.

5. Agree to the license terms and conditions, and click Install.

Click Close

6. Click Close once the installation is complete.

Accept the license agreement and click Install

7. Open vc_redist.x64.exe.

8. Agree to the license terms and conditions, and click Install.

Click Close

9. Click Close once the installation is complete.

10. Restart your PC.

[Back to Table of Contents]

Method 3. Re-Register All DLL Files on Your System Using Command Prompt

Third-party DLL files are registered while installing a particular application. However, when you install an application, its DLL files may not register, and the application will be prevented from accessing the libraries via DLLs. Re-registering DLL files may fix “Error Status 0xc000012f”.

1. Hold down Windows+R keys to open Run.

Type in CMD in Run and hold down Ctrl+Shift+Enter keys to open the elevated Command Prompt

2. In the Run dialog box, type in CMD and hold down Ctrl+Shift+Enter keys to open the elevated Command Prompt.

Type in for %1 in (*.dll) do regsvr32 /s %1 in Command Prompt and press Enter

3. In the Command Prompt window, type in:

for %1 in (*.dll) do regsvr32 /s %1

4. Press Enter. Re-registering all DLL files will take some time.

[Back to Table of Contents]

Method 4. Update Windows 11

Right-click the Windows Start button and click Settings

1. Right-click Start and select Settings.

Select Windows Update in the left pane and click Check for updates

2. In the left pane, select Windows Update.

3. Click Check for updates.

4. Allow Windows to download and install the updates.

Click Restart now

5. Click Restart now once the updates finish installing.

[Back to Top]

▼ Show Discussion

About the author:

Rimvydas Iliavicius

Rimvydas is a researcher with over four years of experience in the cybersecurity industry. He attended Kaunas University of Technology and graduated with a Master's degree in Translation and Localization of Technical texts. His interests in computers and technology led him to become a versatile author in the IT industry. At PCrisk, he's responsible for writing in-depth how-to articles for Microsoft Windows. Contact Rimvydas Iliavicius.

Our guides are free. However, if you want to support us you can send us a donation.

About PCrisk

PCrisk is a cyber security portal, informing Internet users about the latest digital threats. Our content is provided by security experts and professional malware researchers. Read more about us.

Malware activity

Global malware activity level today:

Medium threat activity

Increased attack rate of infections detected within the last 24 hours.