How to Clear the Windows Pagefile at Computer Shutdown

in Windows

Like all computer operating systems, windows writes thing to the memory (RAM memory chips) sequentially until it runs out of physical RAM. When that happens, it writes information that is not currently being used by the processor to the virtual memory. Virtual memory is a file called the pagefile and is stored on the hard disk. The pagefile is also called a swap file because the operating system will swap information between the pagefile and the physical RAM as needed.

From a security point of view, this creates a problem. Since many applications can store temporary files memory on your machine, it is possible that sensitive information such as user ids, passwords, account numbers, etc can end up being stored in the windows pagefile.

To prevent sensitive data from being available to hacker, spyware, etc., you should configure your computer to clear the pagefile at shutdown. There are two ways to do this: edit the registry or use a local security policy.

Editing the Registry

As always, you should make a backup copy of your registry setting just in case you run into a problem. Once the backup is completed, perform the following steps:

  1. Click Start and go to Run
  2. Type regedit in the dialogue box to open the registry editor
  3. Navigate to HKEY_LOCAL_MACHINE
  4. Select SYSTEM -> CurrentControlSet-Control
  5. Click on Session Managerfirst then Memory Management as shown below
  6. Find ClearPageFileAtShutdown in the right hand pane. If the key is not present, right click in the right hand pane and select New->DWORD as shown below
  7. Type ClearPageFileAtShutdown for the DWORD name and select rename
  8. Double click on your new or already existing key and the dialogue box shown below will open
  9. Change the default ‘0’ to ‘1’ to clear the pagefile at shutdown
  10. Exit the registry editor
  11. Reboot the computer

Using a Local Security Policy

To use a local security policy, perform the following steps:

  1. Click Start->Control Panel
  2. Next double click on Administrative Tools and double click on Local Security Policy. The window shown below will open
  3. Select Local Policies
  4. In the right hand pane scroll down and click on Shutdown: Clear Virtual Memory Pagefile as shown above
  5. The window shown below will open
  6. Click on the enabled radio button and then on OK
  7. Close any windows that are open
  8. Reboot the computer for the changes to take effect.

Conclusion

Either of these security methods will cause the shutdown process to be a little longer. The registry edit is usually shorter than using a security policy but if you are not familiar with the registry, you probably should use the security policy.

Related Searches

Comments on this entry are closed.

Previous post:

Next post: