On Error Resume Next

Set WSHShell = WScript.createObject("WScript.Shell")
Set File = CreateObject("Scripting.FileSystemObject")
Set Benutzer = CreateObject("WScript.Network")
MyDocs = WSHShell.specialfolders("MyDocuments")
MyRecent = "C:\Users\" & Benutzer.UserName & "\AppData\Roaming\Microsoft\Windows\Recent\AutomaticDestinations"
'iterates through the 10 MRU values in the registry and deletes them
For i = 0 to 9
WSHShell.regdelete "HKCU\Software\Microsoft\Terminal Server Client\Default\mru" & i
Next
'Default.RDP löschen
File.DeleteFile(MyDocs & "\default.rdp")
'Recent-Einträge im Startmenü löschen
File.DeleteFile(MyRecent & "\*.*")
MsgBox "Gesäubert." & vbcrlf & junk,64,"RDPEX"

