How To Fix the “Windows Created a Temporary Paging File” Error

Pagefile.sys is used by Windows as a Virtual Memory. In this guide, you will learn how to fix Windows created a temporary paging file error.
Fix Windows Created a Temporary Paging File Error

Do you see the “Windows created a temporary paging file” error every time you boot up your computer or try to modify some settings? This error message can be very annoying, however, it’s not impossible to fix.

The issue itself is related to a system file called pagefile.sys. Most of the time, the issue is that this file is corrupted. Due to a bug, it’s also possible that your system falsely thinks it has to create a new one each time you start your computer.

“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.”

Most users report this error on Windows 7 operating systems but can happen on Windows 10 as well. By reading our article, you can learn about the file causing the error, as well as fix it within minutes.

What is the pagefile.sys File?

SYS is a file extension used for system files. These are responsible for managing device drivers, hardware configuration and your system settings. Pagefile.sys is used by Windows as a Virtual Memory. It’s used whenever your computer runs out of physical memory.

For example, imagine that you’re working on something that requires a large number of system resources. Your RAM (physical memory) will be unable to keep up with the amount of information. This leads to some information to end up being stored in a paging file (pagefile.sys).

As time goes by, this paging file has the potential to store a large amount of data. If it becomes too big, it might end up corrupting itself, causing all sorts of issues on your device. This is more likely on older systems, such as Windows 7, but in some cases can happen on Windows 10 as well.

Now that you know what causes the error itself, we can start troubleshooting. It’s important to note that our article was written using Windows 10’s language and wording. However, the methods will all work on Windows 7 as well.

For some of these methods, you will be required to use an administrator account. You can learn how to make one by watching this video from StrowmWind Studios. This is important because administrative permissions are needed to perform specific tasks in Windows.

Once you’re ready, follow our steps to get rid of the “Windows created a temporary paging file” error on Windows 7 and Windows 10.

Run the System File Checker

As mentioned above, there's a possibility that the error originates from messed up system files. In this case, running the integrated System File Checker (SFC scan) can easily find and restore errors automatically.

This tool is widely used to find issues in your system by scanning all protected files. Once it finds any irregularities, it replaces the incorrect file with a previously stored clean version.

To do this, we're going to use the Command Prompt.

Additionally, we recommend forcing Windows Update to fix any other corrupted files on your PC. You can do this by also using the RestoreHealth command (steps included below).

  1. Use the search function in your taskbar and look for Command Prompt. You can bring up the search bar by clicking on its icon or pressing the Windows and S keys on your keyboard.
  2. Right-click on the matching result and select Run as administrator. If prompted, enter your account password.
  3. Once the Command Prompt is open, type in the sfc /scannow command and hit Enter. This will start the System File Checker scan.
  4. Wait for the scan to finish. Depending on your system and the found errors, this can take up to several hours. Make sure that you don’t turn your computer off during this time. If the scan is interrupted, you’ll have to start over.
  5. Restart your computer and see if you get the error message again. If it still shows up, continue with the steps below, even if the SFC scan didn’t find any errors.
  6. Repeat Step 1. and Step 2. to open the elevated Command Prompt again. Once open, type in Dism /Online /Cleanup-Image /RestoreHealth and hit Enter. This command starts another scan.
  7. Wait for the scan to finish. Make sure you have a stable connection to the internet and your system won’t shut down while the scan is running.
  8. Regardless of the outcome of the RestoreHealth scan, run another SFC scan (sfc /scannow) in the same Command Prompt.
  9. When the third scan is complete, restart your computer and check if the error still happens. If you’re still experiencing the “Windows created a temporary paging file” error, try another one of our methods!

Run Disk Cleanup

There is a possibility that the issue is piling up junk on your computer, taking up way too much space. As you’re using your PC day to day, many unnecessary files are created which don’t get removed from your system automatically. Examples of this would be temporary files, cache, image previews, and much more.

These files can slowly eat away at the storage on your PC, affecting the Virtual memory as well. You can clear this junk from your computer with the Disk Cleanup utility.

Tip: Not everything will be caught by the Disk Cleanup tool, but it can help remove most temporary files on your computer. For more thorough cleaning, we recommend using an application such as CCleaner after Disk Cleanup.

Follow the steps below to perform a cleaning:

  1. Use the search function in your taskbar and look for Disk Clean-up. You can bring up the search bar by clicking on its icon or pressing the Windows and S keys on your keyboard.
  2. Open the Disk Cleanup utility from the matching results.
  3. If prompted, select the drive you want to clear and press OK. Select the drive Windows was installed on first. If desired, you can come back and clean other drives in the future.
  4. Wait for the scan to complete. This might take a long time, depending on the specs of your computer and the number of files you have.
  5. Select the type of files you want to delete under the “Files to delete” section. Here is a list of things we recommend cleaning in order to free up space:
    1. Windows Update Clean-up
    2. Temporary Internet Files
    3. Windows error reports and feedback diagnostics
    4. Delivery Optimization Files
    5. Device driver packages
    6. Recycle bin
    7. Temporary files
    8. Thumbnails
  6. Press OK and wait for the Disk Cleanup to finish. Once again, this might take a long time. Don’t turn your computer off during the process.

Disable the Audio File System

The Audio File System (AFS) driver allows Windows to read CDs with music and show the tracks as individual files.

Due to a bug, Windows might wrongly think an audio CD is mounted as a fixed disk. Because it can't read the disk and create a paging file (pagefile.sys), it leads to the “Windows created a temporary paging file” error.

This is only going to work if you already have an AFS driver installed on your PC. If you’re okay with giving up the ability to listen to music from a CD on your computer, try this method. Just in case, we’ve included the steps to turning the Audio File System back on if you change your mind or the method was ineffective.

  1. Use the search function in your taskbar and look for Command Prompt. You can bring up the search bar by clicking on its icon or pressing the Windows and S keys on your keyboard.
  2. Right-click on the matching result and select Run as administrator. If prompted, enter your account password.
  3. Once the Command Prompt is open, type or copy, then paste the following command and hit Enter: sc config afs start= disabled. If you’re typing in the command manually, make sure to include all spaces and characters.
  4. Close the Command Prompt and restart your computer. If you don’t get the same error again, you’ve successfully resolved the issue!

How to turn the Audio File System back on

If you want to turn the Audio File System drivers back on, repeat Step 1. and Step 2. from the previous section to open an elevated Command Prompt. Type or paste in the following command and hit Enter: sc config afs start= enabled.

If your system returns a message saying that “The specified service does not exist as an installed device”, you didn’t have an AFS driver installed. In this case, try one of our other methods.

Force Windows to make a fresh copy of pagefile.sys

If all of the previous methods failed in restoring your PC, you can delete the existing pagefile.sys file and force Windows to create a new replacement. You’ll have to disable Virtual Memory temporarily, delete the paging file and allow Windows to build a new one from scratch.

This method is safe to do, as deleting the pagefile.sys file doesn’t impact your computer or operating system in a bad way. If successfully deleted, it can even free up some space and speed your system up.

You’re required to have an administrator account for this method. 

  1. Press the Windows and R keys on your keyboard at the same time. This will bring up a utility called Run. Type in systempropertiesadvanced and click on the OK button.
  2. By default, you should be on the Advanced tab. Click on the Settings button in the Performance section to bring up the Performance Settings window.
  3. Switch to the Advanced tab, then click on the Change button under Virtual Memory.
  4. First, remove the checkmark from “Automatically manage paging file size for all drives”. When you do this, select the now available Custom size option, and enter a 0 for both Initial size and Maximum size. Click on Set.
  5. Now, Windows will be unable to use the Virtual memory. After you confirm the changes, restart your computer and sign into the same administrator account you just used.
  6. Open your File Explorer and click on Hard drive (C:) under This PC. Find and delete the pagefile.sys file by right-clicking on it and choosing Delete.

    Note: There’s a possibility that you won’t see pagefile.sys right away. In this case, you need to enable “Show hidden files, folders and drives” in your Folder options. If you don’t know how to do this, watch this video by Sydkrieg (Windows 7) or this video by TechZain (Windows 10).
  7. Repeat Step 1. to Step 3. to navigate to the Virtual memory window again. This time, place a checkmark next to “Automatically manage paging file size for all drives” and click the OK button.
  8. Restart your computer. Windows should automatically create a new pagefile.sys, fixing any corruptions with the old one you deleted.

We hope that by following our methods, you were able to get rid of the “Windows created a temporary paging file” error on Windows 7 and Windows 10. If it ever returns in the future, feel free to repeat our solutions!