Monday, April 25, 2011

Erasing the swapfile at shutdown in Windows

This article describes the registry modifications required to implement removal of the swapfile in a Windows OS at shutdown.

It's just one registry key. Here's the relevant section from the kb article.
Change the data value of the ClearPageFileAtShutdown value in the following registry key to a value of 1:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
If the value does not exist, add the following value:
Value Name: ClearPageFileAtShutdown
Value Type: REG_DWORD
Value: 1

This is handy for when you can't be worried about moving it from place to place, like in a migration. Also can help when doing a Storage Migration; lots less data to move.

No comments:

Post a Comment