Saturday, June 21, 2008

How To Automatically Clear The Windows Paging File When The Computer Shuts Down

Windows has a nice feature called "virtual memory" which converts hard drive space into RAM. This works in addition to the RAM already installed in your PC. The file is named pagefile.sys. The purpose of this is to have more memory available for running applications. As much as the paging file is a helpful feature, there is one drawback: Data remains there even after the computer has been shut down and started back up. If the machine is infected or has been hacked into, this is one thing the intruders might look for since information such as passwords and browsing history can be stolen from it. There is a simple value that can be added to the registry to have Windows automatically clear the paging file when the computer shuts down. This may slow the shutdown time by one to two minutes, but is worth it to be safe in the long-run.

NOTE: It is very important that if you do not feel comfortable editing the registry or have never done it before that you avoid doing this right away and learn more about the Windows registry. Changing the wrong setting or changing a setting incorrectly can cause Windows to not function correctly.

Here are the step-by-step instructions to automatically clear the Windows paging file when the computer shuts down:

  1. Click "Start"
  2. Click "Run..."
  3. Where it says "Open:" type "regedit"
  4. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
  5. Look for a an entry on the right side of the window (where the list of REG_DWORD entries are) for an entry called "ClearPageFileAtShutdown". If you see it, skip to step 11. If you do not see it, continue to step 6.
  6. Right-click any blank space on the right frame of the window (a good place would be underneath where all of the REG_DWORD values are, in the blank white space). You will see a menu come up that says "New".
  7. Highlight the word "New" so it opens up a submenu.
  8. In the submenu, select "DWORD Value"
  9. A new value will be created and with the highlited text "New Value #1".
  10. Delete the text "New Value #1" and rename it "ClearPageFileAtShutdown".
  11. Right-click it to pull down a small menu and select "Modify".
  12. Where it says "Value data:" and has a text field with the number "0" entered, change that to "1" (without the quote marks of course).
  13. Click "OK".
Finished! The changes will take effect after you reboot your computer.

0 comments: