9

Despite my best effort researching and debugging this problem on my own, I haven't been able to solve it.

Some basic info to start:

  • I'm running the latest version of Windows 10 (no pending updates at the time of writing).
  • I have two 500 GB drives (C: and D:).
  • I want to put my page file on the D: drive (where there is more available space).
  • Here are my current virtual memory settings:
    Virtual memory (page file) settings for both C and D drives

Now, the problem. Every time I boot, I get this message:

"Windows created a temporary paging file..." error

No matter what I do, I can't seem to get this message to stop appearing. And I don't know what kind of "problem" Windows is running into.

Here's a list of everything I've tried so far:

  • Restarting (many times)
  • Turning off page files for both drives (and restarting afterwards). (The pagefile.sys file disappears from both drives, but the error still comes up.)
  • System File Checker (sfc /scannow)
  • Deployment Image Servicing and Management tool (Dism /Online /Cleanup-Image /RestoreHealth)
  • Check Disk tool on both volumes (chkdsk C: /R and chkdsk D: /R)
  • Repair installation of Windows 10 (in-place upgrade using the "keep files and apps" setting)

Any other advice on what I should try, or where I should look for more details on what's going wrong?

  • 1
    The problem is that you're trying not to have a page file on the system partition. Just let Windows have what it wants. – Daniel B Apr 19 '22 at 20:27
  • I've seen this myself, and it was a matter of an existing pagefile that was somehow corrupted and thus a new one could not be made. But yeah, there needs to be a pagefile on C too, even if its just a small one. – LPChip Apr 19 '22 at 20:31
  • ~24 GB free space on a ~500 GB drive is perhaps somewhat too low: aim for maybe 20% free space so that it can keep running smoothly. – Andrew Morton Apr 19 '22 at 20:35
  • @AndrewMorton I agree with that, but it's not always easy. I decided to move a couple file groups around so that the OS had most of the free space and the D drive is nearly full instead. – Keith Stein Apr 20 '22 at 00:46
  • @DanielB I know Windows Server it doesn't have a problem with the page file not being on the OS disk, but Windows Desktop might be different. In the end I rearranged my files to move the free space and put the page file back on the C drive. – Keith Stein Apr 20 '22 at 00:47

2 Answers2

10

I found a working solution here: https://answers.microsoft.com/en-us/windows/forum/all/move-pagefile-to-another-disk-windows-keeps-using/b80fed24-12ff-4482-a45d-fdbae4f08987

No matter what you do it keeps creating a temporary page file on C:\ the solution to this is if you have enabled Bitlocker Drive Encryption it creates and enables the registry key "PagefileOnOsVolume" and set it to enabled. https://support.microsoft.com/en-us/help/929820/bitlocker-drive-encryption-bde-enables-the-pagefileonosvolume-registry

Even if you disable bitlocker and decrypt the drives this registry key stays set as enabled bypassing any attempts to move the page file to another partition / drive. If you set HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Memory Management\PagefileOnOsVolume to 0 then reboot you will be able to set your page file to none on your OS drive and move it properly to another partition / hd.

Dmitry K.
  • 200
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center. – Community Sep 04 '22 at 19:37
  • 1
    Thank you so much! This did the trick! I was having so much trouble moving the 60gb pagefile.sys from my OS C:\ drive (which has Bitlocker) to another internal hard drive. Changing registry key HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Memory Management\PagefileOnOsVolume from 1 to 0 then rebooting solved it!! – RcoderNY Oct 25 '23 at 16:36
3

I encountered the same problem and found a (dissatisfying) fix for it.

My observations were:

  • Windows wants a page file on C: (as @Daniel B wrote in the comments)
  • The secondary page file must have a fixed size, otherwise windows won't use it

Therefore you have to create a small (16MB - 32MB or so) page file on C:. Then you can create a second page file on another drive. The second page file must have a fixed size, otherwise windows won't use it properly.

With the following settings, I get a page file on a secondary drive working:

Virtual Memory