直接上碼供參考 關鍵點說明: 1.清理windows訪問記錄,包含在任務欄上右鍵出現最近訪問的程式的記錄%UserProfile%\AppData\Roaming\Microsoft\Windows\Recent\AutomaticDestinations%UserProfile%\AppData\ ...
直接上碼供參考
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