Computer and data security should always be a priority. Simple tweaks to the Windows 11 registry file can eliminate the commonly overlooked security concerns — the page file.
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. It requires diligence, perseverance and stamina to prevent unauthorized access to your sensitive data. There are some automated steps we can take to make our data safer on Windows 11.
See: Cyber Security Strategy 2021: Strategies, Challenges and Supply Chain Concerns (Tech Republic Premium)
The Windows 11 page file (pagefile.sys) serves as a form of virtual memory for the operating system, freeing up physical RAM for most preferred applications, drivers, files, etc. In general, the Windows 11 page file improves the overall performance of your PC, which is good. However, by default, the Windows page file itself does not delete when your session is over and, therefore, can be accessed by individuals with malicious intent.
Delete the Windows 11 page file with each shutdown
To close this potential security vulnerability, we edit the Windows 11 registry file every time we close our computer to force the deletion of pagefile.sys, thereby eliminating any potential security vulnerability. With this method, the next time we launch our Windows 11 computer, the page file will be recreated with new data specific to that new session. Performance is not significantly affected.
Disclaimer: Editing a Windows registry file is a serious task. A malicious Windows registry file can disable your computer, requiring the restoration of the Windows operating system and possible loss of data. Back up the Windows registry file and create a valid restore point before you proceed.
See: How to Delete a Windows 10 Paging File on Every Shutdown (Tech Republic)
To make our edits in the Windows 11 registry file, we type regedit For Windows 11 Search Device. From the results, select the Regedit app, and then use the left-hand window to navigate to this key, as shown 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 Image bTo delete a system 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 application.
If for some reason you want to return to the default setting, return to this key and change the value data to 0 (zero).
File settings on the current Windows 11 page
If you’re curious what your current Windows 11 page file system settings are, you need to delve deeper into the advanced settings. Model Advanced System Settings In Windows 11 Desktop Search and select the appropriate item from the results to reach the screen shown Figure c.
Click the Settings button in the Performance section of the screen and then click the Advanced tab to reveal the screen shown Figure D.
In most cases, it is best to allow Windows 11 to automatically manage virtual memory. In previous years, when we were dealing with Windows 95, XP and Vista and memory capacity was at a premium, it was important to maintain virtual memory individually to enhance system performance. But such drastic measures are not necessary now.
However, it is prudent security management to systematically delete a page file when you close Windows 11, especially if you regularly manage customer and customer sensitive personal data. This is a simple registry file tweak that should be the default setting for all Windows 11 users.