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 of 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:
- Launching lots of applications
- Launching an application as a different user
- 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 11/10:
- Re-register ALL the DLL files
- Run SFC and DISM
- Troubleshoot in Clean Boot State.
- Fix the Registry Entry.
- 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.
1] 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-click on the appropriate entry and click 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 11/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.
Fix: ESRV.exe Application Error 0xc0000142
2] Run SFC and DISM
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.
3] Troubleshoot in Clean Boot State
Troubleshooting in Clean Boot State always holds the potential to fix a lot of errors related to the System.
Fix: Blue Screen error 0xc0000142 on Windows 11
4] 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.
You may want to also check the following key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion \Windows\LoadAppInit_DLLs
Change value of LoadAppInit_DLLs from 1 to 0.
After you are done deleting, close the Registry Editor and Reboot your computer for the changes to take effect.
Fix: Office application error 0xc0000142.
5] Check Group Policy setting
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 Home machines because it does not have the Group Policy Editor.
I hope this post helps you. Advanced users may want to read this post on MSDN.
Other similar The application was unable to start correctly errors:
- The application failed to initialize properly (0xc0000135)
- The application failed to initialize properly 0xc0000005
- The application was unable to start correctly (0xc0000022)
- The application was unable to start correctly (0xc0000018)
- The application was unable to start correctly (0xc0000017)
- The application was unable to start correctly (0xc00007b).