如何实现清理IE和使用历史记录的bat代码

发布时间:2021-09-30 11:29:20 作者:小新
来源:亿速云 阅读:113

这篇文章将为大家详细讲解有关如何实现清理IE和使用历史记录的bat代码,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。

代码如下:

@echo off
title: IE temporary file deleter
echo 正在 清除Internet临时文件 ............
  RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8
  echo 清除Cookies
  RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2
  echo 清除历史记录
  RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1
  echo 清除表单数据
  RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 16
  echo 清除密码
  RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 32
  echo 清除上述全部项目
  RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255
  echo 清除上述全部项目,以及IE7中使用的加载项所保存的各种数据
  RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351 
msg * your useless files have been crashed,master........
pause

批处理怎样清理XP系统的使用痕迹能?
xp系统下,能否用   批处理    实现清理使用痕迹的功能?
IE使用痕迹  系统使用痕迹  软件使用痕迹等等。
网上搜索了几个,感觉都不太好用。
不想用软件清理,只想运行一下bat文件,就自动清理完了。
有没有bat批处理,实现 清理天使.rar  这个软件里面的清理痕迹功能?


ygqiang 中尉 Rank: 5Rank: 5 帖子356 积分803 技术1  捐助0  注册时间2010-4-18 2楼
 发表于 2011-4-8 14:03 | 只看该作者
其实我主要是想清理下上网痕迹
网上下载的bat文件,不行
这个软件,清理的比较彻底 !

代码如下:


@echo off
mode con cols=50 lines=15
echo 10秒后即将进行清理,请先关闭浏览器
ping -n 10 127.1>nul 2>nul
cls
echo 清理中,请稍后。。。
del /f /s /q %temp%\*.* >nul 2>nul
del /f /s /q "%userprofile%\locals~1\tempor~1\*.*" >nul 2>nul
del /f /s /q "%systemdirve%\recycled\*.*" >nul 2>nul
del /f /s /q "%userprofile%\recent\*.*" >nul 2>nul
del /f /s /q "%userprofile%\cookies\*.*" >nul 2>nul
del /f /s /q "%userprofile%\locals~1\history\*.*" >nul 2>nul
echo y | reg delete "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Internet Explorer\TypedURLS" >nul 2>nul
echo y | reg delete "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\internet settings\5.0\cache\extensible cache" >nul 2>nul
cls
echo 清理完毕,按任意键退出
pause>nul

下面的的代码是经过优化,可以记录清理日志信息等

代码如下:


@echo off
color 0a
mode con cols=100 lines=350
echo %date% %time%
set time1=%time::=%
set file=%time1:~,8%
echo 即将进行清理,请先关闭浏览器
set /p=<nul 1>cls%file%.log 2>clsErr%file%.log
set /p a=你确定继续清理吗?(Y/N)
if /i  not "%a%"=="y" goto :end

echo 清理中,请稍后。。。
echo ------------------------------------开始清理:%temp%\*.*>>cls%file%.log
del /f /s /q %temp%\*.* >>cls%file%.log 2>>clsErr%file%.log
del /f /s /q "%userprofile%\locals~1\tempor~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~1\history\*.*" >>cls%file%.log 2>>clsErr%file%.log
echo ------------------------------------开始清理:注册表信息>>cls%file%.log
echo y | reg delete "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Internet Explorer\TypedURLS" >>cls%file%.log 2>>clsErr%file%.log
echo y | reg delete "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\internet settings\5.0\cache\extensible cache" >>cls%file%.log 2>>clsErr%file%.log
echo 清理完毕,按任意键退出

:end
pause

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

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

文件内容是:

代码如下:


HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\TypedURLs
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main
"Save_Session_History_On_Exit"="yes"
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\TypedURLs [8]

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

文件内容是:

代码如下:


reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /f /v "History" /t REG_EXPAND_SZ /d "%%USERPROFILE%%\Local Settings\History//\"
regini 彻底屏蔽历史记录.ini

用1个bat批处理解决。

代码如下:


;删除上网记录
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /f /v "History" /t REG_EXPAND_SZ /d "%%USERPROFILE%%\Local Settings\History//\"
reg add "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\TypedURLs"
reg add "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main" /f /v "Save_Session_History_On_Exit" /t REG_SZ /d "yes"
echo HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\TypedURL [8]>tmp.ini
regini tmp.ini
If "%ERRORLEVEL%"=="0" del tmp.ini

以上这个,可以屏蔽ie浏览器的“历史记录”

关于“如何实现清理IE和使用历史记录的bat代码”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,使各位可以学到更多知识,如果觉得文章不错,请把它分享出去让更多的人看到。

推荐阅读:
  1. 清理清理火狐历史记录
  2. python如何清理shell中的代码

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

bat

上一篇:有哪些提高网页加载速度的方法

下一篇:GitHub上JavaScript开源项目都有哪些

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》