'Disable Clear Page File, XP
Option Explicit
Dim WshShell, M, Message

Set WshShell = WScript.CreateObject("WScript.Shell")

Message = "This script will Disable Clear Page file after LogOff." & vbCr & vbCr _
  & "Adding information can unintentionally change or delete values and cause components to stop working correctly." _
 & "  If you do not trust the source of this information, do not add it to the registry."  & vbCr  & vbCr _
 & "Would you like to continue?"

M = MsgBox(Message, vbYesNo + vbInformation, "Paul's XP and Vista Tweaks")
If M = 6 Then 

WshShell.RegWrite "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\ClearPageFileAtShutdown", 0, "REG_DWORD"

Message = "Clear Page File at LogOff is now DISABLED!" & vbCr & vbCr  _
 & "This script was downloaded from www.paulsxp.com."
MsgBox Message,48, "Done!"
End If


