0x00000240: Windows Can't Create Paging File – Fixed
This error means Windows failed to create the pagefile. Usually it's a disk space or permission issue. Here's how to fix it fast.
This error is a pain, I know
You're staring at a blue screen or a log entry that says ERROR_PAGEFILE_CREATE_FAILED with code 0x00000240. Windows is telling you it can't create the paging file — and without it, your system might crash or refuse to boot. Let's get this sorted.
The real fix: two things to check
In my 6 years running a help desk blog, I saw this error pop up in two main scenarios: after a disk cleanup gone wrong, or when someone moved their pagefile to a partition that ran out of space. Skip the fancy tools — here's what actually works.
1. Free up disk space on the system drive
Windows needs room to create pagefile.sys. If your C: drive has less than 1GB free, that's your culprit. Open File Explorer, right-click C: drive, and check the free space. If it's cramped, run Disk Cleanup: press Win + R, type cleanmgr, hit Enter. Select system files too — that often clears several GB of Windows Update leftovers.
If you're under 500MB free, you may need to temporarily move files to an external drive or uninstall a large app. I've seen Visual Studio or a Steam game hog 30GB — uninstalling one fixed the pagefile error instantly for a client.
2. Reset the pagefile size manually
Sometimes the pagefile settings get corrupted. Here's how to reset them:
- Press Win + R, type
sysdm.cpl, hit Enter. - Go to the Advanced tab, then under Performance click Settings.
- Click the Advanced tab in Performance Options, then under Virtual memory click Change.
- Uncheck Automatically manage paging file size for all drives.
- Select drive C:, click No paging file, then Set. Reboot.
- After reboot, go back to same spot, select C: again, choose System managed size, click Set, reboot again.
This rebuilds the pagefile from scratch. I've fixed dozens of machines with this alone.
Why this works
The pagefile is a hidden system file at C:\pagefile.sys. If it's corrupted — say from a bad shutdown or a disk error — Windows can't create a new one because the old one is locked. Resetting it forces Windows to delete the old file and create a fresh one. Disk space matters because Windows needs contiguous free space to allocate the file; fragmented or nearly-full drives can trip up the NTFS allocation logic.
Less common variations
Permission problems
If you migrated your user profile or messed with NTFS permissions, Windows might lack rights to write to the root of C:. To check, open Command Prompt as admin and run:
icacls C:\ | find "Everyone"If you don't see (OI)(CI)(RX) for Everyone, run:
icacls C:\ /grant Everyone:(RX)Then try the pagefile reset again. This tripped me up the first time I saw it on a corporate laptop that had its security settings locked down by IT.
Registry corruption
Rare, but I've seen it on Windows 10 20H2 builds. Open Registry Editor (regedit), go to:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory ManagementCheck the PagingFiles value. It should look like C:\pagefile.sys 0 0. If it's missing or weird, delete it and reboot — Windows will recreate it with defaults.
Antivirus blocking
Yes, I've seen Norton and McAfee block pagefile creation thinking it's suspicious. Temporarily disable your AV, reboot, and test. If that fixes it, add an exclusion for C:\pagefile.sys in your AV settings.
Prevention
Keep at least 10% of your system drive free — that's not just for pagefiles, it's for Windows updates and temp files too. If you're tight on space, move your pagefile to another drive: set a custom size (e.g., 4096MB min/max) on a secondary SSD. Also run chkdsk C: /f every few months to catch disk errors before they corrupt the pagefile.
One last tip: don't disable the pagefile entirely unless you have 32GB+ RAM and know what you're doing. Some apps (and Windows itself) assume it exists. I've seen Photoshop crash without it.
That should get you back up. If you're still stuck after this, check your disk health with CrystalDiskInfo — a failing drive can trigger this error too. Good luck.
Was this solution helpful?