清除windows 远程桌面访问记录 批处理
直接上码供参考
1 @echo OFF 2 color 0a 3 Title Clear Windows Recent 4 Mode con cols=109 lines=30 5 :START 6 ECHO. 7 Echo ========================================================================== 8 ECHO. 9 Echo Clear Windows Recent 10 ECHO. 11 Echo ========================================================================== 12 Echo. 13 echo. 14 echo. 15 :TUNNEL 16 ECHO. 17 ECHO. 18 ECHO. 19 ECHO. %UserProfile%\AppData\Roaming\Microsoft\Windows\Recent\AutomaticDestinations 20 ECHO. %UserProfile%\AppData\Roaming\Microsoft\Windows\Recent\CustomDestinations 21 del /f /s /q %UserProfile%\AppData\Roaming\Microsoft\Windows\Recent\AutomaticDestinations\*.* 22 del /f /s /q %UserProfile%\AppData\Roaming\Microsoft\Windows\Recent\CustomDestinations\*.* 23 del /F /S /Q /AH %UserProfile%\Documents\Default.rdp 24 reg delete "HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Default" /va /f 25 26 PAUSE 27 goto TUNNEL
关键点说明:
1.清理windows访问记录,包含在任务栏上右键出现最近访问的程序的记录
%UserProfile%\AppData\Roaming\Microsoft\Windows\Recent\AutomaticDestinations
%UserProfile%\AppData\Roaming\Microsoft\Windows\Recent\CustomDestinations
2.删除远程桌面的记录文件
%UserProfile%\Documents\Default.rdp
3.清除注册表中远程桌面地址下拉列表内容
"HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Default" /va /f