重置IE浏览器脚本
将以下内容保存为vbs脚本,编码为ANSI\UTF-16 LE直接打开运行即可。dim msg
msg = MsgBox("重置后IE所有设置包括收藏夹等都会恢复默认值"+vbCrLf+"确定要重置IE吗?",vbOKCancel+vbExclamation+vbDefaultButton2,"重置IE")
if msg = vbCancel then
wscript.quit
end if
Set objAP = CreateObject("wscript.shell")
objAP.Run "rundll32.exe inetcpl.cpl ResetIEtoDefaults"
wscript.sleep 800
objAP.AppActivate "Reset Internet Explorer Settings"
objAP.SendKeys "{TAB}"
objAP.SendKeys "{ }"
wscript.sleep 800
objAP.SendKeys "{TAB}"
objAP.SendKeys "{TAB}"
objAP.SendKeys "{ }"
wscript.sleep 3000
objAP.SendKeys "{ENTER}"
或者将以下内容保存为bat脚本,编码为ANSI直接打开运行。
@echo off
title 重置IE浏览器
echo dim msg>>ResetIE.vbs
echo msg = MsgBox("重置后IE所有设置包括收藏夹等都会恢复默认值"+vbCrLf+"确定要重置IE吗?",vbOKCancel+vbExclamation+vbDefaultButton2,"重置IE")>>ResetIE.vbs
echo if msg = vbCancel then>>ResetIE.vbs
echo wscript.quit>>ResetIE.vbs
echo end if>>ResetIE.vbs
echo Set objAP = CreateObject("wscript.shell")>>ResetIE.vbs
echo objAP.Run "rundll32.exe inetcpl.cpl ResetIEtoDefaults">>ResetIE.vbs
echo wscript.sleep 800>>ResetIE.vbs
echo objAP.AppActivate "Reset Internet Explorer Settings">>ResetIE.vbs
echo objAP.SendKeys "{TAB}">>ResetIE.vbs
echo objAP.SendKeys "{ }">>ResetIE.vbs
echo wscript.sleep 800>>ResetIE.vbs
echo objAP.SendKeys "{TAB}">>ResetIE.vbs
echo objAP.SendKeys "{TAB}">>ResetIE.vbs
echo objAP.SendKeys "{ }">>ResetIE.vbs
echo wscript.sleep 3000>>ResetIE.vbs
echo objAP.SendKeys "{ENTER}">>ResetIE.vbs
cscript ResetIE.vbs
echo/
echo 已重置IE浏览器!
del /q ResetIE.vbs
pause
vbs精简模式,没有确认提示,打开直接重置。
Set objAP = CreateObject("wscript.shell")
objAP.Run "rundll32.exe inetcpl.cpl ResetIEtoDefaults"
wscript.sleep 800
objAP.AppActivate "Reset Internet Explorer Settings"
objAP.AppActivate "重置 Internet Explorer 设置"
objAP.SendKeys "%{P}"
wscript.sleep 300
objAP.SendKeys "%{R}"
wscript.sleep 3000
objAP.AppActivate "Reset Internet Explorer Settings"
objAP.AppActivate "重置 Internet Explorer 设置"
objAP.SendKeys "%{C}"
注意:此操作仅支持 Windows Vista 及以上版本的系统,Windows XP 没有重置选项。
但可以通过 inetcpl.cpl,6 命令打开高级选项(此命令适用所有系统)
页:
[1]