Another way to set the computer to clear the pagefile without directly editing the registry is:
1.Click on the Start button
2.Go to the Control Panel
3.Administrative Tools
4.Local Security Policy
5.Local Policies
6.Click on Security Options
7.Right hand menu - right click on "Shutdown: Clear Virtual Memory Pagefile"
8.Select "Enable"
9.Reboot
If you want to clear the page file on each shutdown:
1.Start Regedit
2.Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\ClearPageFileAtShutdown
3.Set the value to 1