Microsoft Windows Error Code 0xC0000040: How to Fix It
Medium 30-60 minutes Medium Severity
Verified June 2026
- Error Code
- 0xC0000040
- Brand
- Microsoft Windows
- Product Type
- operating_system
- Severity
- Medium
- DIY Difficulty
- Medium
- Estimated Fix Time
- 30-60 minutes
Ad
Tools You'll Need
- Windows installation media (USB or DVD)
- Another computer to create installation media if needed
How to Fix Error Code 0xC0000040
-
Boot from Windows Installation Media
Make sure to back up your important data before proceeding if possible. Booting from installation media will not affect your files unless you reinstall Windows. -
Open Command Prompt
-
Run DISM (Deployment Imaging Service and Management Tool)
Do not close the command prompt while DISM is running. It may take several minutes. -
Run System File Checker (SFC)
-
Check for Disk Errors
Do not restart the computer during CHKDSK. -
Restart Your Computer
Ad
When to Call a Professional
If the error persists after running these commands, your drive may be failing or the hardware may have issues. Contact a professional technician to diagnose potential hard drive failure or other hardware problems.Frequently Asked Questions
What causes error 0xC0000040?
This error is caused by a corrupted system file or driver that is too large for Windows to load, often due to a failed update, bad sectors on the hard drive, or malware.
Can I fix error 0xC0000040 without installation media?
If you cannot boot into Windows, you will need installation media to access the repair tools. Without it, you cannot run the necessary commands.
Will I lose my data when fixing error 0xC0000040?
No, the steps in this guide only repair system files and do not delete personal files. However, it's always a good idea to have a backup.
What if DISM says 'source files not found'?
This means DISM cannot find the repair files. You can specify a Windows image file (install.wim) from your installation media. For example: dism /image:C:\ /cleanup-image /restorehealth /source:D:\sources\install.wim. Replace D with your media drive letter.
How do I create Windows installation media?
On another computer, go to Microsoft's official website, download the Media Creation Tool, and follow the instructions to create a USB or DVD. You will need a blank USB of at least 8GB.