The application was unable to start correctly (0xc0000142) in Windows 10

You may have come across a moment, when you tried to open an application, and it failed to open, throwing up instead an error message The application was unable to start correctly (0xc0000142). If you receive this error, then this post may interest you.

Today, we are focussing on this error when opening the Command Prompt. The Command Prompt is usually one of the constant while fixing different types of errors on Windows 10. But what if the same Command Prompt encounters the same error? It becomes really difficult to fix these kinds of errors. But it is not impossible to do so. There are a number of factors that are causes to these kinds of errors. Some third-party programs, malware, and other factors come under this category. We will try every potential fix in order to fix this error.

The error reads-

The application was unable to start correctly (0xc0000142). Click OK to close the application.

And the user has no other option than to click on the button labeled as OK.

Says Microsoft,

There are primarily 3 actions that can cause this error:

  1. Launching lots of applications
  2. Launching an application as a different user
  3. Launching an application to a different desktop

If you are wondering what the error 0xc0000142 means in the above Message Box, you can find the error in ntstatus.h. It is STATUS_DLL_INIT_FAILED or “{DLL Initialization Failed} Initialization of the dynamic link library %hs failed. The process is terminating abnormally.”

The application was unable to start correctly (0xc0000142)

We will be trying the following potential fixes to try fixing error 0xc0000142 for the Command Prompt on Windows 10:

  1. Re-register ALL the DLL files
  2. Run SFC and DISM
  3. Troubleshoot in Clean Boot State.
  4. Fix the Registry Entry.
  5. Check Group Policy setting.

I recommended you create a System Restore Point. This is because while doing these types of modifications, there are chances that something breaks on the software side of your computer. Or, if you do not have any habit to make a system restore point, I would encourage you to create one frequently.

Re-register ALL the DLL files

First of all, start by opening a Command Prompt window with Administrator privileges by searching for CMD in Cortana Search Box. Then right clicking on the appropriate entry and clicking on Run as Administrator.

Then type in the following and hit Enter:

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

This will re-register ALL the DLL files.

You should be doing this as soon as you boot into Windows 10 or do it after booting into Safe Mode.

After you are done, Reboot your computer and check if the error is now fixed or not.

Run SFC and DISM

SFC DISM Ultimate Windows Tweaker

Download Ultimate Windows Tweaker and use it to Run System File Checker and DISM with the click of a button. This will check the OS for potential file corruptions, and repair the system image, respectively.

Troubleshoot in Clean Boot State

Troubleshooting in Clean Boot State always holds the potential to fix a lot of errors related to the System. You can read more about this in our guide on how to Perform a Clean Boot.

Check Registry setting

Hit the WINKEY + R button combination to launch the Run utility, type in regedit and hit Enter. Click on Yes for the UAC or User Account Control Prompt that you get.

Once Registry Editor opens, navigate to the following key location-

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run

Now delete the segments of the programs from the right side panel. These segments include the DWORD Values and other entries made by the conflicting program in the mentioned location inside of the Registry Editor.

After you are done deleting, close the Registry Editor and Reboot your computer for the changes to take effect.

Check Group Policy setting

Disable Command Prompt

Open Run box, type gpedit.msc and hit Enter to open the Local Group Policy Editor. Navigate to the following path:

User Configuration/Administrative Templates/System

In the right side pane, you will see Prevent access to the command prompt. Double click on it to set the policy. Select Enabled and click Apply/OK.

This policy setting prevents users from running the interactive command prompt, Cmd.exe.  This policy setting also determines whether batch files (.cmd and .bat) can run on the computer. If you enable this policy setting and the user tries to open a command window, the system displays a message explaining that a setting prevents the action. If you disable this policy setting or do not configure it, users can run Cmd.exe and batch files normally.

Here, you can also Disable the command prompt script processing also, if you wish.

If your version of Windows does not have this Group Policy entry, you can skip this fix. This fix will surely not work on Windows 10 Home machines because it does not have the Group Policy Editor.

Hope this post helps you. Advanced users may want to read this post on MSDN.

Download this VPN to secure all your Windows devices and browse anonymously
Posted by on , in Category Windows with Tags
Ayush has been a Windows enthusiast since the day he got his first PC with Windows 98SE. He is an active Windows Insider since Day 1 and is now a Windows Insider MVP. He has been testing pre-release services on his Windows 10 PC, Lumia, and Android devices.