Purpose: Clears the Most Recently Used list of computers in the Remote Desktop Client Computer drop down box
Author: Brian Heil
Date: 15 March 2004
History: V1.0 – first script. used WMI to delete registry entries.
V1.1 – added deletion of Default.RDP file to clear the computer box as well as the dropdown.
V1.2 – changed to wscript RegDelete method, sped up deletion loop significantly.
On Error Resume Next
Set WSHShell = WScript.createObject(“WScript.Shell”)
Set File = CreateObject(“Scripting.FileSystemObject”)
MYDocs = WSHShell.specialfolders(“MyDocuments”)
For i = 0 to 9
WSHShell.regdelete “HKCU\Software\Microsoft\Terminal Server Client\Default\mru” & i
Deletes the Default.RDP file in the current users My Documents directory. This holds the value in the default value in Computer box in the RDC
File.DeleteFile(MyDocs & “\default.rdp”)
MsgBox “MRU List Cleared.” & vbcrlf & junk,64,”Success”