WSL: The application was unable to start correctly on shutdown error message
Environment
Windows build number: 10.0.19041.0
Your Distribution version: Ubunto 20.04
WSL2
Steps to reproduce
Reset or shut-down PC, then I get the short brief error message:
The application was unable to start correctly (0xc0000142). Click OK to close the application.
Sometimes the error message appears for brief times and disappears and sometimes it prevents my PC from being shut down.
Here’s an image:

Expected behavior
I expect to shut-down my PC without getting the error message
Actual behavior
I get the error message
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 42
- Comments: 27 (1 by maintainers)
I always get the error on shutdown since using Docker in WSL. Thankfully it only appears for a second or so and the PC shuts down itself without needing to acknowledge the error, but it is annoying.
This current issue thread is about the error
0xc0000142caused bywsl.exe, your error is the same error code but caused bycmd.exe. The issue you have is not related to WSL in any way, it’s related to command prompt and the error0xc0000142is a generic error on windows that translates tomissing application file required for a program to run correctly.Do you see the issue here? You are on the WSL component github repo but your error is not related to it.
I had the same issue however with the solutions proposed in the following issue I was able to fix it. https://github.com/microsoft/WSL/issues/5448