You are currently offline, waiting for your internet to reconnect

How to Clear the Windows Paging File at Shutdown

Support for Windows XP has ended

Microsoft ended support for Windows XP on April 8, 2014. This change has affected your software updates and security options. Learn what this means for you and how to stay protected.

This article was previously published under Q314834
For a Microsoft Windows 2000 version of this article, see 182086.
This article documents the method for clearing the Windows paging file (Pagefile.sys) during the shutdown process, so that no unsecured data is contained in the paging file when the shutdown process is complete.

Note If you enable this feature, the shutdown time may be increased.
Some third-party programs can temporarily store unencrypted (plain-text) passwords or other sensitive information in memory. Because of the Windows virtual memory architecture, this information can be present in the paging file.

Although clearing the paging file is not a suitable substitute for physical security of a computer, you might want to do this to increase the security of data on a computer while Windows is not running.

Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 How to back up and restore the registry in Windows
To have us clear the windows paging file at shutdown for you, go to the "Fix it for me" section. If you prefer to fix this problem yourself, go to the "Let me fix it myself" section.

Fix it for me

To fix this problem automatically, click the Fix itbutton or link. Click Runin the File Download dialog box, and follow the steps in the Fix it wizard.

  • This wizard may be in English only. However, the automatic fix also works for other language versions of Windows. 
  • If you are not on the computer that has the problem, save the Fix it solution to a flash drive or a CD and then run it on the computer that has the problem.

Next, go to the "Did this fix the problem?" section.

Let me fix it myself

  1. Start Registry Editor (Regedt32.exe).
  2. Change the data value of the ClearPageFileAtShutdown value in the following registry key to a value of 1:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
    If the value does not exist, add the following value:
    Value Name: ClearPageFileAtShutdown
    Value Type: REG_DWORD
    Value: 1
This change does not take effect until you restart the computer.

For additional information about Session Manager memory management settings, click the article number below to view the article in the Microsoft Knowledge Base:
102985 REG: CurrentControlSet Entries PART 2: SessionManager

Did this fix the problem?

  • Check whether the problem is fixed. If the problem is fixed, you are finished with this section. If the problem is not fixed, you can contact support.
  • We would appreciate your feedback. To provide feedback or to report any issues with this solution, please leave a comment on the "Fix it for me" blog or send us an e-mail.
erase delete zero null wipe

Article ID: 314834 - Last Review: 07/20/2010 01:30:00 - Revision: 3.0

  • Microsoft Windows XP Home Edition
  • Microsoft Windows XP Professional
  • Microsoft Windows XP Professional x64 Edition
  • Windows Vista Enterprise
  • Windows Vista Home Basic
  • Windows Vista Ultimate
  • Windows 7 Enterprise
  • Windows 7 Ultimate
  • Windows 7 Professional
  • Windows Server 2008 Enterprise
  • Windows Server 2008 Standard
  • Windows Server 2008 R2 Enterprise
  • Windows Server 2008 R2 Standard
  • kbhowto kbenv kbinfo kbsecurity kbmsifixme kbfixme KB314834