当前位置: 移动技术网 > IT编程>网络>Dos/Bat > 清理IE和使用历史记录的bat代码

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

2017年12月08日  | 移动技术网IT编程  | 我要评论

复制代码 代码如下:

@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地址栏的历史网站记录呢?

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网