- @echo off
- :main
- cls
- echo 备份/还原IE安全设置
- echo 1、备份
- echo 2、还原
- echo.
- set choice=
- set /p choice=请选择[序号+回车]:
- if %choice% == 1 goto bf
- if %choice% == 2 goto hy
- cls
- echo 错误:“%choice%”不是有效值,请重新选择!
- ping 0 -n 2 >nul
- goto main
-
- :bf
- echo.
- if not exist "IE安全设置备份\" md "IE安全设置备份\"
- cd /d "IE安全设置备份\"
- reg export "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\TemplatePolicies" "HKLM_TemplatePolicies.reg" /y
- reg export "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Zones" "HKLM_Zones.reg" /y
- reg export "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap" "HKCU_ZoneMap.reg" /y
- reg export "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones" "HKCU_Zones.reg" /y
- pause & exit
-
- :hy
- echo.
- if not exist "IE安全设置备份\" (
- echo 错误:没有找到备份文件!
- ping 0 -n 3 >nul
- goto main
- ) else (
- cd /d "IE安全设置备份\"
- regedit /s "HKLM_TemplatePolicies.reg"
- regedit /s "HKLM_Zones.reg"
- regedit /s "HKCU_ZoneMap.reg"
- regedit /s "HKCU_Zones.reg"
- )
- pause & exit
复制代码 回复 1# liuchaozheng |