How to Clear Virtual Memory Pagefile at Shutdown in Windows 10
Virtual memory support uses a system pagefile to swap pages of memory to disk when they are not used. On a running system, this pagefile is opened exclusively by the operating system, and it is well protected. However, systems that are configured to allow booting to other operating systems might have to make sure that the system pagefile is wiped clean when this system shuts down. This ensures that sensitive information from process memory that might go into the pagefile is not available to an unauthorized user who manages to directly access the pagefile.
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.
The Shutdown: Clear virtual memory pagefile security policy setting determines whether the virtual memory paging file is cleared when the device is shut down.
If you turn on clear virtual memory pagefile upon clean shutdown, the hibernation file (hiberfil.sys) is also zeroed out if hibernation is disabled.
If you turn on clear virtual memory pagefile upon clean shutdown, shutdown and restart will take a bit longer to finish.
This tutorial will show you how to turn on or off to clear the virtual memory pagefile when you shut down or restart Windows 10.
You must be signed in as an administrator to be able to turn on or off to clear the virtual memory pagefile at shutdown.
Contents
- Option One: To Turn On or Off Clear Virtual Memory Pagefile at Shutdown in Local Security Policy
- Option Two: To Turn On or Off Clear Virtual Memory Pagefile at Shutdown using a REG file
The Local Security Policy will only be available in the Windows 10 Pro and Windows 10 Enterprise editions.
All editions can use Option Two below.
1 Open Local Security Policy (secpol.msc).
2 Click/tap to open Local Policies and Security Options in the left pane of Local Security Policy. (see screenshot below)
3 In the right pane of Security Options, double click/tap on the Shutdown: Clear virtual memory pagefile policy to open its properties. (see screenshot above)
4 Select (dot) Enabled or Disabled (default) for what you want, and click/tap on OK. (see screenshot below)
5 When finished, you can close Local Security Policy if you like.
The downloadable .reg files below will modify the DWORD value in the registry key below.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
ClearPageFileAtShutdown DWORD
0= Off
1 = On
1 Do step 2 (on) or step 3 (off) below for what you would like to do.
A) Click/tap on the Download button below to download the file below, and go to step 4 below.
Turn_On_Clear_Pagefile_at_Shutdown.reg
Download
This is the default setting.
A) Click/tap on the Download button below to download the file below, and go to step 4 below.
Turn_Off_Clear_Pagefile_at_Shutdown.reg
Download
4 Save the .reg file to your desktop.
5 Double click/tap on the downloaded .reg file to merge it.
6 When prompted, click/tap on Run, Yes (UAC), Yes, and OK to approve the merge.
7 You can now delete the downloaded .reg file if you like.
That's it,
Shawn
Related Tutorials
- How to Manage Virtual Memory Pagefile in Windows 10
- How to Enable or Disable Virtual Memory Pagefile Encryption in Windows 10
- How to Allow or Prevent Users and Groups to Create a Pagefile in Windows 10