Windows XP: Clear the paging file
The paging file is used as temporary storage, kind of like RAM only a lot slower. The problem is that information hangs around in the paging file a lot longer than it does in RAM. This can be a security issue if a plain-text password, or any other sensitive information, was stored in the paging file. You can’t clear the paging file while Windows is running but you can clear it on shutdown.
Open up the registry, regedit.exe, and browse to the following location:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
Double-click on the key entitled ClearPageFileAtShutdown and change the value to 1. If the value does not exists, right-click in the right side pane and choose New -> DWORD value. Give the new value the name ClearPageFileAtShutdown and set the value to 1.
Restart the computer for the changes to take effect.
To optimize the paging file, download the program called PageDefrag from Sysinternals (freeware). PageDefrag works with Windows NT, 2000, XP and 2003. The program will show you how much fragmentation exists in your system files (includes pagefile.sys). Since system files can’t be defragemented while Windows is running, PageDefrag allows you to schedule a defrag upon the next, or all, system boot ups.
(Article 9, Day 10)
30.Mar.06
Security, Tech Tip, Windows
You can leave a response, or trackback from your own site.























Clearing the pagefile might be useful in a highly secure environment but it really only makes sense as part of a comprehensive security plicy. In itself it will do little. There are other ways to gain access to confidential data and most require less effort.
Clearing the pagefile means overwriting every byte with zero’s. The pagefile is not deleted. This can lengthen shutdown times considerably.
There are absolutely NO performance advantages in doing this.
Larry Miller
Microsoft MCSA
There are absolutely NO performance advantages in doing this.
I know. The performance gain is from defragmenting the paging file. Even then, the performance gain is very small unless the paging file is heavily fragmented.