Skip to content

This guide will show you how to allow/prevent Windows 10 to clear virtual memory pagefile at shutdown. Clearing this file may increase OS security.

In case if physical memory (RAM) isn’t enough to meet memory demand of running programs on operating system, virtual memory stored in pagefile is used. Virtual memory support uses a system pagefile to swap pages of memory to disk when they are not used. The pagefile may sometime contain sensitive information, hence an operating system have an exclusive authorization to open this well protected file. On dual or multiple boot systems, this is concern of security.

Thus, in order to increase the security of your operating system, its good step to clear this system pagefile at shutdown. Clearing out pagefile will also zeroed down hibernation file (hiberfil.sys), when hibernation is disabled.

Here’s how to allow or prevent Windows 10 to clear system pagefile at shutdown.

How To Allow/Prevent Windows 10 To Clear Virtual Memory Pagefile At Shutdown

WAY 1 – Via Security Policy Snap-in

1. Press Windows Key + R and put secpol.msc in Run dialog box. Click OK to open Security Policy snap-in.

Local Security Policy Editor

2. Then in Security Policy snap-in window, navigate here:

Security Settings > Local Policies > Security Options

How To Allow/Prevent Windows 10 To Clear Virtual Memory Pagefile At Shutdown

3. In the right pane of Security Options, look for Shutdown: Clear virtual memory pagefile named setting. It must be Disabled by default, which means Windows 10 won’t clear virtual memory pagefile at shutdown.

How To Allow/Prevent Windows 10 To Clear Virtual Memory Pagefile At Shutdown

4. Change the setting to Enabled, to allow clearing virtual memory pagefile at shutdown. Click OK. Close Security Policy snap-in.

To revert the setting to default later, restore Disabled state of policy setting.

WAY 2 – Via Registry

Registry Disclaimer: The further steps will involve registry manipulation. Making mistakes while manipulating registry could affect your system adversely. So be careful while editing registry entries and create a System Restore point first.

1. Press W8K + R and put regedit in Run dialog box to open Registry Editor (if you’re not familiar with Registry Editor, then click here). Click OK.

Windows 10 Registry Editor

2. In left pane of Registry Editor window, navigate to following registry key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management

How To Allow/Prevent Windows 10 To Clear Virtual Memory Pagefile At Shutdown

3. Now in the right pane of Memory Management registry key, right click and select New > DWORD Value. Name the newly created registry DWORD (REG_DWORD) as ClearPageFileAtShutdown. Double click to modify the DWORD’s Value data:

How To Allow/Prevent Windows 10 To Clear Virtual Memory Pagefile At Shutdown

4. Finally, set the Value data to 1, to allow clearing virtual memory pagefile at shutdown. Click OK. Close Registry Editor and reboot the machine to make changes effective.

To revert the setting to default later, restore 0 as Value data for ClearPageFileAtShutdown registry DWORD.

So this is how you can manage virtual memory pagefile behavior at shutdown.

That’s it!


Facebook Google+ Twitter

Leave a Reply

Your email address will not be published. Required fields are marked *

Recent Comments

  • Bob_WA : My three home computers can "see" eachother in File Explorer / Network...

    8 hours ago

  • Kapil Arya : ^^ You're most welcome!...

    17 hours ago

  • Vivisektor : Hi Kapil, Thanks, yes I have run wushowhide.diagcab several times (bot...

    20 hours ago

  • Rect : Thank You Kapil...

    22 hours ago

  • Kapil Arya : ^^ You need to find "Users" option in lusrmgr snap-in, not in Computer...

    1 day ago