0XC0000143

Fix 0xC0000143 Missing System File Error on Windows

Your PC won't boot because a critical system file like ntoskrnl.exe is missing or corrupted. Here's how to fix it in under 30 minutes.

The 30-Second Fix: Check Your Boot Device

Before you dive into command-line wizardry, do the obvious. I've seen this error pop up because someone bumped the power cord, or the BIOS got confused and tried to boot from a USB stick that wasn't there.

  1. Restart the PC and mash F2, Del, or Esc (depends on your motherboard) to get into BIOS/UEFI.
  2. Look for the Boot Order section. Make sure your main hard drive or SSD is listed first. If you see a USB or CD-ROM at the top, change it.
  3. Save and exit. See if Windows comes up.

Had a client last month whose cat jumped on the case, knocked the USB drive loose, and the BIOS defaulted to network boot. Took me 10 seconds to fix, after a 30-minute phone call. Try this first.

The 5-Minute Fix: Boot Repair from Recovery

If that didn't work, Windows might have a corrupted boot configuration or missing system files. You need the recovery environment.

Get to Windows Recovery Environment (WinRE)

Windows should pop into automatic repair after two failed boots. If it doesn't, you'll need a Windows installation USB (USB stick with Windows setup). Boot from it, then click Repair your computer at the bottom-left corner.

Once you're in the blue-screen menu, go to Troubleshoot > Advanced Options > Command Prompt.

Run Bootrec and SFC

In the command prompt, type these commands one at a time. Hit Enter after each:

bootrec /fixmbr
bootrec /fixboot
bootrec /scanos
bootrec /rebuildbcd

If bootrec /fixboot gives you an Access Denied error, that's common on newer UEFI systems. Skip it and move on.

After that, run a system file check on the Windows partition. If Windows is on C: in the recovery environment (it usually is, but confirm with dir C:\Windows), type:

sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows

Let it run. This checks all protected system files against the installation media. I've seen this fix the error when a driver update nuked ntoskrnl.exe — the file that error 0xC0000143 specifically complains about.

Reboot. If it works, you're done.

The 15+ Minute Fix: DISM and Manual File Replacement

Still stuck? The corruption is deeper, or the file is straight-up missing. Let's get dirty.

Run DISM

Back in the command prompt (same recovery environment), run DISM to restore the system image health. Use this command:

DISM /Image:C:\ /Cleanup-Image /RestoreHealth /Source:C:\Windows\WinSxS

If that fails because WinSxS is also corrupted, you'll need the install.wim from your Windows USB. Mount your USB (usually D: or E:), then use:

DISM /Image:C:\ /Cleanup-Image /RestoreHealth /Source:D:\sources\install.wim:1 /LimitAccess

Replace D: with your USB drive letter. The :1 is typically the Windows edition index (Pro, Home, etc.). If you're not sure, run dism /get-imageinfo /imagefile:D:\sources\install.wim to list them.

Manually Replace the Bad File

If DISM finishes but the error persists, you'll need to grab the specific file from the install.wim. Usually it's ntoskrnl.exe (located in C:\Windows\System32). But the error might say %hs — you'll need to check the exact file. On a working machine, search for %hs is bad or missing in Event Viewer, or just look at the error screen — sometimes it names the file.

To extract a single file from the image:

md C:\temp
xcopy D:\sources\install.wim C:\temp /E

Actually, that won't work directly. Better to use dism /mount-image. But that's overkill. Here's a faster way: use the sfc with the /offbootdir and /offwindir flags we already did — that's usually enough.

If you're absolutely sure the file is missing (e.g., you see File not found when trying to copy it), then boot from a Linux live USB, mount the Windows partition, and copy the file from a known-good Windows install. But that's a last resort.

Last Resort: In-Place Upgrade

If nothing works, you're looking at an in-place upgrade (reinstall Windows keeping your files). Boot from the installation USB, click Install now, and when it asks for the edition, pick the one you have. On the next screen, choose Upgrade: Install Windows and keep files, settings, and applications. This replaces all system files without touching your data. Takes about 45 minutes but fixes everything.

One more thing: if you're on an older machine with a failing hard drive, no amount of software fixes will help. I had a client with this exact error — we replaced the drive and the error never came back. Run a disk check if you can get to a command prompt: chkdsk C: /f /r from recovery.

Related Errors in Windows Errors
0X00040182 Fix OLEOBJ_S_INVALIDHWND (0x00040182) in Windows 0XC0150026 Fix STATUS_GENERIC_COMMAND_FAILED (0XC0150026) Now 0X00041305 Fix SCHED_S_TASK_NOT_SCHEDULED (0X00041305) Error 0XC00D2EF4 Fix NS_E_REQUIRE_STREAMING_CLIENT (0XC00D2EF4) on Windows

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.