This script will Enable Recent Items so they will not be deleded at logOff. (VBScript)

'Remove Clear Recent Items Key
On Error Resume Next
Set WshShell = WScript.CreateObject("WScript.Shell")

Message = "This script will remove the registry key for Recent Items." & vbCR
Message = Message & "Recent Items wiil no longer be deleted at LogOff." & vbCR & vbCR
Message = Message & "Continue?"
X = MsgBox(Message, vbYesNo + vbQuestion, "Notice")
If X = 6 Then

Err.Clear>br>
WshShell.RegDelete "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\ClearRecentDocsOnExit"
If Err.Number <> 0 then
MsgBox "The registry entry does not exist." & vbcr & vbcr & "This script was downloaded from www.paulsxp.com",48,"Error!"
Else
MsgBox "The registry entry has been removed." & vbcr &vbcr & "This script was downloaded from www.paulsxp.com" , 16,"Done!"
End If
Set WshShell = Nothing
End If

Download


Back to Line 8a