清理IE和使用历史记录的bat代码

2019-01-30 00:01:53王振洲

echo 清理中,请稍后。。。
echo ------------------------------------开始清理:%temp%*.*>>cls%file%.log
del /f /s /q %temp%*.* >>cls%file%.log 2>>clsErr%file%.log
del /f /s /q "%userprofile%locals~1tempor~1*.*" >>cls%file%.log 2>>clsErr%file%.log
del /f /s /q "%systemdirve%recycled*.*" >>cls%file%.log 2>>clsErr%file%.log
del /f /s /q "%userprofile%recent*.*" >>cls%file%.log 2>>clsErr%file%.log
del /f /s /q "%userprofile%cookies*.*" >>cls%file%.log 2>>clsErr%file%.log
del /f /s /q "%userprofile%locals~1history*.*" >>cls%file%.log 2>>clsErr%file%.log
echo ------------------------------------开始清理:注册表信息>>cls%file%.log
echo y | reg delete "HKEY_CURRENT_USERSOFTWAREMicrosoftInternet ExplorerTypedURLS" >>cls%file%.log 2>>clsErr%file%.log
echo y | reg delete "HKEY_CURRENT_USERSOFTWAREMicrosoftWindowsCurrentVersioninternet settings5.0cacheextensible cache" >>cls%file%.log 2>>clsErr%file%.log
echo 清理完毕,按任意键退出

:end
pause

找了2个文件,
但能否将这2个文件,做到1个bat批处理文件 或者 reg文件 里面呢?

1、彻底屏蔽历史记录.ini

文件内容是:


HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerTypedURLs
HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerMain
"Save_Session_History_On_Exit"="yes"
HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerTypedURLs [8]

2、彻底屏蔽历史记录.bat

文件内容是:


reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerUser Shell Folders" /f /v "History" /t REG_EXPAND_SZ /d "%%USERPROFILE%%Local SettingsHistory//"
regini 彻底屏蔽历史记录.ini

用1个bat批处理解决。


;删除上网记录
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerUser Shell Folders" /f /v "History" /t REG_EXPAND_SZ /d "%%USERPROFILE%%Local SettingsHistory//"
reg add "HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerTypedURLs"
reg add "HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerMain" /f /v "Save_Session_History_On_Exit" /t REG_SZ /d "yes"
echo HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerTypedURL [8]>tmp.ini
regini tmp.ini
If "%ERRORLEVEL%"=="0" del tmp.ini

以上这个,可以屏蔽ie浏览器的“历史记录”
但如何清除ie地址栏的历史网站记录呢?

相关文章 大家在看