Sometimes, you may need to turn off the paging file on the OS partition for testing or when shrinking the C drive. After turning off the paging file (“pagefile.sys”) on the OS partition and enabling it on another drive or partition, Windows keeps creating a temporary paging file on the OS partition.
The following notification appears at startup.
Windows created a temporary paging file on your computer because of a problem that occurred with your paging file configuration when you started your computer. The total paging file size for all disk drives may be somewhat larger than the size you specified.
Cause
Windows may keep creating a temporary paging file on the OS volume because of the PagefileOnOsVolume registry setting.
When BitLocker is enabled on the computer, it creates the “PagefileOnOsVolume” registry value and sets its data to “1”. This forces Windows to create pagefile.sys on the OS partition, ignoring your custom settings in the “Performance Options” dialog.
BitLocker enables the registry setting to help protect confidential data in a page file.
Resolution
To stop Windows from creating the paging file in the OS partition on BitLocker-enabled systems, please use the registry edit below:
- Launch Regedit.exe and go to the following key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
- Double-click PagefileOnOsVolume and set it to 0.
- Exit the Registry Editor.
If necessary, configure the paging file settings again. To do so, launch the file SystemPropertiesAdvanced.exe, click “Settings” under Performance, click “Advanced’, and click “Change”. Configure the paging file settings there.
- Restart Windows.
That should stop Windows from creating pagefile.sys in the OS partition.
One small request: If you liked this post, please share this?
One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:- Pin it!
- Share it to your favorite blog + Facebook, Reddit
- Tweet it!