Clear Recent Documents – Log off




Tagged Under : , , , ,

Version: 13.4
Revision: 43 Build 16

Clear ‘Recent Documents’ – Log off


Introduction: sometime in our lives, we don’t want to fiddle or modify our registry library – just to delete windows ‘recent documents’. Instead, there is a script which does this job for you…

1.] Download notepad++ from the original author or from a mirror and install the software.
——————————-

http://sourceforge.net/projects/notepad-plus/

http://filehippo.com/download_notepad/

——————————-

2.] Copy this script into your notepad and save it as a “.vbs” extension.

Enable – Clear Recentdoc @ log off
—Copy Source Code—

'Author: Lair360
'Version: 13.2
'Revision: 35 Build 16
'Clear Recentdoc @ log off
'-------------------------------------------
On Error Resume Next
Wscript.Echo "This script will clear all recentdoc @ log off"
	Dim objShell, objFileSystem
Set globalnews=WScript.CreateObject("WScript.Shell")
	nret1=globalnews.Run("cmd /C reg add HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\ /v ClearRecentDocsOnExit /t REG_DWORD /d 1 /f",0,TRUE)
		nret2=globalnews.Run("cmd /C reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer\ /v ClearRecentDocsOnExit /t REG_DWORD /d 1 /f",0,TRUE)
'-------------------------------------------
WScript.Echo "Please reboot your computer or log off..."
	'VBScript Ends

—End Source Code—
Copyright 2001-2009 Lair360

Enable – Clear Recentdoc @ log off
—Copy Source Code—

'Author: Lair360
'Version: 13.2
'Revision: 35 Build 16
'Clear Recentdoc @ log off
'-------------------------------------------
On Error Resume Next
Wscript.Echo "This script will disable: clear all recentdoc @ log off"
	Dim objShell, objFileSystem
Set globalnews=WScript.CreateObject("WScript.Shell")
	nret1=globalnews.Run("cmd /C reg add HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\ /v ClearRecentDocsOnExit /t REG_DWORD /d 0 /f",0,TRUE)
		nret2=globalnews.Run("cmd /C reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer\ /v ClearRecentDocsOnExit /t REG_DWORD /d 0 /f",0,TRUE)
'-------------------------------------------
WScript.Echo "Please reboot your computer or log off..."
	'VBScript Ends

—End Source Code—
Copyright By Lair360




MaxRecentDocs VBScript




Tagged Under : , ,

Version: 16.3
Revision: 54 Build 15

MaxRecentDocs VBScript

Introduction: this registry controls how many “shortcuts” the system can display in the Documents menu on the Start menu. The “Recent Documents” menu contains shortcuts to the nonprogram files the user has most recently opened. By default, the system displays shortcuts to the 15 “most recently” opened documents.

1.] Download notepad++ from the original author or from a mirror and install the software.
——————————-

http://sourceforge.net/projects/notepad-plus/

http://filehippo.com/download_notepad/

——————————-

Notes: these registry entries will be modified…
——————————-
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\MaxRecentDocs
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\MaxRecentDocs

2.] Copy this code into your notepad…

—Copy Source Code—

On Error Resume Next
Wscript.Echo "Proceed to modify MaxRecentDocs policy"
'-------------------------------------
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.RegDelete "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\MaxRecentDocs","REG_DWORD"
WshShell.RegDelete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer\MaxRecentDocs","REG_DWORD"
'--------------------------------------
WshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\MaxRecentDocs", 15,"REG_DWORD"
WshShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer\MaxRecentDocs", 15,"REG_DWORD"
Wscript.Echo "Please reboot your computer"

—End Source Code—

If you don’t want to use the VBScript edition, please use this source code and save the file as “.reg” extention…

Notes: please reboot when you activate the script!

—Copy Source Code—

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"MaxRecentDocs"=dword:0000000f

—End Source Code—
Copyright 2001-2008 Lair360