Whether it is at work or at home, security should be a priority for all users and IT professionals regardless of which operating system they choose to run on their personal computer. Preventing unauthorized access to your sensitive data requires diligence, perseverance and stamina. There are certain automated steps we can take to further secure our data in Windows 11.
SEE: Cybersecurity strategy 2021: Tactics, challenges and supply chain concerns (TechRepublic Premium)
The Windows 11 page file (pagefile.sys) acts as a form of virtual memory for the operating system, freeing up the physical RAM for higher priority applications, drivers, files, etc. Generally, the Windows 11 page file increases the overall performance of your PC, which is a good thing. However, by default, the Windows page file does not delete itself when your session is over and can, therefore, be accessed by individuals with malicious intent later.
Delete the Windows 11 page file with every shutdown
To close this potential security vulnerability, we will edit the Windows 11 Registry file to force the deletion of pagefile.sys every time we shut down our computer, thereby removing any potential security vulnerability. With this method, the next time we start our Windows 11 computer, the page file will be recreated with new data specific to that new session. Performance will not be noticeably impacted.
Disclaimer: Editing the Windows Registry file is a serious undertaking. A corrupted Windows Registry file could render your computer inoperable, requiring a reinstallation of the Windows operating system and potential loss of data. Back up the Windows Registry file and create a valid restore point before you proceed.
SEE: How to delete the Windows 10 paging file on every shutdown (TechRepublic)
To make our edits in the Windows 11 Registry File, we will type regedit into the Windows 11 search tool. From the results, choose the Regedit app, and then use the left-hand window to navigate to this key, as shown in Figure A.
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
Highlight the Memory Management key, and then turn your attention to the left-hand window. Look for an item labeled ClearPageFileAtShutdown, and double-click it. As shown in Figure B, to have the system delete the page file after each shutdown, change the Value data box from 0 (zero) to 1.
Click OK to complete the process, and then close the Registry Editor app.
If for some reason you would like to change back to the default setting, return to this key and change the Value data back to a 0 (zero).
Current Windows 11 page file settings
If you are curious what your current Windows 11 page file system settings are, you must delve deep into advanced settings. Type advanced system settings into the Windows 11 desktop search and select the appropriate item from the results to reach the screen shown in Figure C.
Click the Settings button in the Performance section of the screen and then click the Advanced tab to reveal the screen shown in Figure D.
Under most circumstances, it is best to let Windows 11 automatically manage virtual memory. In years past, when we were dealing with Windows 95, XP, and Vista, and when memory capacity was at a premium, personally managing virtual memory was important for increasing system performance. But such drastic steps are simply not necessary now.
However, systematically deleting the page file when you shut down Windows 11 is just prudent security management, particularly if you deal with the sensitive personal data of customers and clients on a regular basis. It is a simple Registry file tweak that should be a normal setting for all Windows 11 users.