Published by


Brink's Avatar
Administrator

Posts: 25,288

Show Printable Version 


How to Clear Virtual Memory Pagefile at Shutdown in Windows 10

information   Information
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.

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.
Note   Note
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.

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





Clear Virtual Memory Pagefile at Shutdown in Windows 10 OPTION ONE Clear Virtual Memory Pagefile at Shutdown in Windows 10
To Turn On or Off Clear Virtual Memory Pagefile at Shutdown in Local Security Policy

Note   Note
Local Security Policy will only be available in the Windows 10 Pro and Windows 10 Enterprise editions.

You can use Option Two below in any edition though.


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)

Name:  Clear_pagefile_at_shutdown_secpol-1.jpg
Views: 3044
Size:  84.8 KB

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)

Name:  Clear_pagefile_at_shutdown_secpol-2.png
Views: 3035
Size:  16.5 KB

5. When finished, you can close Local Security Policy if you like.





Clear Virtual Memory Pagefile at Shutdown in Windows 10 OPTION TWO Clear Virtual Memory Pagefile at Shutdown in Windows 10
To Turn On or Off Clear Virtual Memory Pagefile at Shutdown using a REG file

Note   Note
The .reg files below will modify the DWORD value below 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.


 2. To Turn On Clear Virtual Memory Pagefile at Shutdown

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


 3. To Turn Off Clear Virtual Memory Pagefile at Shutdown

NOTE: 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. If prompted, click 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