第二个批处理复制代码
- @echo off
- >"%tmp%\t.reg" more +5 "%~f0"
- regedit /s "%tmp%\t.reg"
- echo;兼容性视图设置已修改,请重启IE浏览器
- ping /n 2 0 >nul& exit
- Windows Registry Editor Version 5.00
- [HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\BrowserEmulation\ClearableListData]
- "UserFilter"=hex:41,1f,00,00,53,08,ad,ba,05,00,00,00,a4,00,00,00,01,00,00,00,\
- 05,00,00,00,0c,00,00,00,28,2d,36,05,80,8b,d4,01,01,00,00,00,06,00,61,00,2e,\
- 00,62,00,6f,00,73,00,73,00,0c,00,00,00,1e,f8,03,07,80,8b,d4,01,01,00,00,00,\
- 06,00,62,00,2e,00,62,00,6f,00,73,00,73,00,0c,00,00,00,a8,ab,86,09,80,8b,d4,\
- 01,01,00,00,00,06,00,63,00,2e,00,62,00,6f,00,73,00,73,00,0c,00,00,00,5f,44,\
- 6c,0b,80,8b,d4,01,01,00,00,00,07,00,68,00,65,00,2e,00,62,00,6f,00,73,00,73,\
- 00,0c,00,00,00,b3,67,56,0f,80,8b,d4,01,01,00,00,00,06,00,2a,00,2e,00,62,00,\
- 6f,00,73,00,73,00
复制代码
- @ECHO OFF
- ECHO 开始系统设置
- ECHO 该设置不会对您的电脑使用带来影响
- ECHO ---增加信任站点
- cd c:\windows\system32
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\sd.cmcc\*" /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\sd.cmcc\*" /v "*" /t REG_DWORD /d 2 /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\chinamobile.com\*" /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\chinamobile.com\*" /v "*" /t REG_DWORD /d 2 /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\10086.cn\*" /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\10086.cn\*" /v "*" /t REG_DWORD /d 2 /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\sdboss.com\*" /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\sdboss.com\*" /v "*" /t REG_DWORD /d 2 /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\hq.cmcc\*" /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\hq.cmcc\*" /v "*" /t REG_DWORD /d 2 /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\sd4a.com\*" /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\sd4a.com\*" /v "*" /t REG_DWORD /d 2 /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range101" /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range101" /v ":Range" /t REG_SZ /d "10.*.*.*" /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range101" /v "*" /t REG_DWORD /d 2 /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range102" /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range102" /v ":Range" /t REG_SZ /d "134.*.*.*" /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range102" /v "*" /t REG_DWORD /d 2 /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range102" /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range102" /v ":Range" /t REG_SZ /d "133.*.*.*" /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range102" /v "*" /t REG_DWORD /d 2 /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range102" /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range102" /v ":Range" /t REG_SZ /d "*a.boss*" /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range102" /v "*" /t REG_DWORD /d 2 /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range102" /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range102" /v ":Range" /t REG_SZ /d "*b.boss*" /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range102" /v "*" /t REG_DWORD /d 2 /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range102" /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range102" /v ":Range" /t REG_SZ /d "*c.boss*" /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range102" /v "*" /t REG_DWORD /d 2 /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range102" /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range102" /v ":Range" /t REG_SZ /d "*d.boss*" /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range102" /v "*" /t REG_DWORD /d 2 /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range102" /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range102" /v ":Range" /t REG_SZ /d "*4a.he.boss*" /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range102" /v "*" /t REG_DWORD /d 2 /f > nul
- ECHO ---设置IE信任区域
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "DisplayName" /t REG_SZ /d "可信站点" /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "CurrentLeve1" /t REG_DWORD /d 0x00001000 /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "Flags" /t REG_DWORD /d 0x00000043 /f > nul
- REM 1405:标记为安全可执行的ActiveX控件执行
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1405" /t REG_DWORD /d 0x00000000 /f > nul
- REM 1001:下载已签名的ActiveX控件
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1001" /t REG_DWORD /d 0x00000000 /f > nul
- REM 1004:下载未签名的ActiveX控件
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1004" /t REG_DWORD /d 0x00000000 /f > nul
- REM 1200:运行ActiveX控件和插件
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1200" /t REG_DWORD /d 0x00000000 /f > nul
- REM 1201:执行没有标记为安全的ActiveX控件
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1201" /t REG_DWORD /d 0x00000000 /f > nul
- REM 1402:Java小程序脚本
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1402" /t REG_DWORD /d 0x00000000 /f > nul
- REM 2201:ActiveX控件自动提示
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "2201" /t REG_DWORD /d 0x00000000 /f > nul
- REM 1208:允许运行以前未使用的Activex控件而不提示 0-启用 3-禁用(默认)
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1208" /t REG_DWORD /d 0x00000000 /f > nul
- REM 120B:仅允许经过批准的域在未经提示的情况下使用Activex:0-禁用 3-启用(默认)
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "120B" /t REG_DWORD /d 0x00000000 /f > nul
- REM 120A:在没有使用外部媒体播放机的网页上显示视频和动画
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "120A" /t REG_DWORD /d 0x00000000 /f > nul
- REM 1209:允许Scriptlet
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1209" /t REG_DWORD /d 0x00000000 /f > nul
- REM 1809:使用弹出窗口阻止程序
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1809" /t REG_DWORD /d 0x00000003 /f > nul
- REM 2000:二进制和脚本行为
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "2000" /t REG_DWORD /d 0x00000000 /f > nul
- REM 1407:允许对剪贴板进行编程访问
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1407" /t REG_DWORD /d 0x00000000 /f > nul
- REM 1609:显示混合内容 *
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1609" /t REG_DWORD /d 0x00000000 /f > nul
- REM 2300:允许网页为活动内容使用受限制的协议
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "2300" /t REG_DWORD /d 0x00000000 /f > nul
- REM 1804:在 IFRAME 中加载程序和文件
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1804" /t REG_DWORD /d 0x00000000 /f > nul
- REM 1800:桌面项目的安装
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1800" /t REG_DWORD /d 0x00000000 /f > nul
- REM 1607:跨域浏览子框架
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1607" /t REG_DWORD /d 0x00000000 /f > nul
- REM 1A04:没有证书或只有一个证书时不提示选择客户证书
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1A04" /t REG_DWORD /d 0x00000000 /f > nul
- REM 1406:通过域访问数据资源
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1406" /t REG_DWORD /d 0x00000000 /f > nul
- REM 1206:允许 Internet Explorer Webbrowser 控件的脚本
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1206" /t REG_DWORD /d 0x00000000 /f > nul
- REM 2102:允许由脚本初始化的窗口,没有大小和位置限制
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "2102" /t REG_DWORD /d 0x00000000 /f > nul
- REM 2200:文件下载自动提示
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "2200" /t REG_DWORD /d 0x00000000 /f > nul
- REM 1405:标记为安全可执行的ActiveX控件执行
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3" /v "1405" /t REG_DWORD /d 0x00000000 /f > nul
- REM 1004:下载未签名的ActiveX控件
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3" /v "1004" /t REG_DWORD /d 0x00000001 /f > nul
- REM 1201:执行没有标记为安全的ActiveX控件
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3" /v "1201" /t REG_DWORD /d 0x00000001 /f > nul
- REM 2201:ActiveX控件自动提示
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3" /v "2201" /t REG_DWORD /d 0x00000000 /f > nul
- REM 1208:允许运行以前未使用的Activex控件而不提示 0-启用 3-禁用(默认)
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3" /v "1208" /t REG_DWORD /d 0x00000000 /f > nul
- REM 120A:在没有使用外部媒体播放机的网页上显示视频和动画
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3" /v "120A" /t REG_DWORD /d 0x00000000 /f > nul
- REM 1209:允许Scriptlet
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3" /v "1209" /t REG_DWORD /d 0x00000000 /f > nul
- REM 1809:使用弹出窗口阻止程序
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3" /v "1809" /t REG_DWORD /d 0x00000003 /f > nul
- REM :禁用“启用选项卡浏览”
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\TabbedBrowsing" /v "Enabled" /t REG_DWORD /d 0x00000000 /f > nul
- REM :启用隐私-高级“替代自动cookie处理”
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v "PrivacyAdvanced" /t REG_DWORD /d 0x00000001 /f > nul
- ECHO 设置内存保护
- REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\AdvancedOptions\CRYPTO\NX" /v UncheckedValue /f> nul
- REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\AdvancedOptions\CRYPTO\NX" /v "UncheckedValue" /t REG_DWORD /d 0x00000001 /f > nul
- REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\AdvancedOptions\CRYPTO\NX" /v CheckedValue /f> nul
- REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\AdvancedOptions\CRYPTO\NX" /v "CheckedValue" /t REG_DWORD /d 0x00000000 /f > nul
- REM :检查所存网页的较新版本 自动
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v "SyncMode5" /t REG_DWORD /d 0x00000004 /f > nul
- REM :关闭 IE8 "启用内存保护帮助减少联机攻击"
- REG ADD "HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Main" /v "DEPOff" /t REG_DWORD /d 0x00000001 /f > nul
- REM 设置不使用兼容视图 HKCU\Software\Microsoft\Internet Explorer\BrowserEmulation\ClearableListData
- ECHO 设置不使用兼容视图
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\BrowserEmulation" /v AllSitesCompatibilityMode /t REG_DWORD /d 0x00000000 /f > nul
- ECHO 设置IE8不自动切换兼容视图
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\BrowserEmulation" /v AutomaticLayoutRecovery /t REG_DWORD /d 0x00000000 /f > nul
- ECHO 特定网站使用兼容视图
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\BrowserEmulation" /v IntranetCompatibilityMode /t REG_DWORD /d 0x00000000 /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\BrowserEmulation" /v MSCompatibilityMode /t REG_DWORD /d 0x00000000 /f > nul
- ECHO 设置IE新打开窗口不共享cookie
- ECHO y | REG DELETE "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main" /v "TabProcGrowth"
- ECHO y | REG DELETE "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main" /v "XMLHTTP"
- ECHO y | REG DELETE "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\PageSetup" /v "Print_Background"
- ECHO 设置IE11参数
- REM 32位方式运行
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main" /v "TabProcGrowth" /t REG_DWORD /d "1" /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main" /v "Isolation" /t REG_SZ /d "PMIL" /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main" /v "XMLHTTP" /t REG_DWORD /d 0x00000001 /f > nul
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\PageSetup" /v "Print_Background" /t REG_SZ /d "yes" /f > nul
- ECHO 设置完成
参考:批处理动态生成脚本或文件复制代码
- for /f "delims=:" %%i in ('findstr /n "^:DynamicScript$" "%~f0"') do (
- more +%%i "%~f0" > "%tmp%\t.reg"
- )
- regedit /s "%tmp%\t.reg"
- echo;兼容性视图设置已修改,请重启IE浏览器
- ping /n 2 0 >nul
- goto :eof
- REM 请确保待生成的文本位于脚本的末尾
- :DynamicScript
- Windows Registry Editor Version 5.00
- [HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\BrowserEmulation\ClearableListData]
- "UserFilter"=hex:41,1f,00,00,53,08,ad,ba,05,00,00,00,a4,00,00,00,01,00,00,00,\
- 05,00,00,00,0c,00,00,00,28,2d,36,05,80,8b,d4,01,01,00,00,00,06,00,61,00,2e,\
- 00,62,00,6f,00,73,00,73,00,0c,00,00,00,1e,f8,03,07,80,8b,d4,01,01,00,00,00,\
- 06,00,62,00,2e,00,62,00,6f,00,73,00,73,00,0c,00,00,00,a8,ab,86,09,80,8b,d4,\
- 01,01,00,00,00,06,00,63,00,2e,00,62,00,6f,00,73,00,73,00,0c,00,00,00,5f,44,\
- 6c,0b,80,8b,d4,01,01,00,00,00,07,00,68,00,65,00,2e,00,62,00,6f,00,73,00,73,\
- 00,0c,00,00,00,b3,67,56,0f,80,8b,d4,01,01,00,00,00,06,00,2a,00,2e,00,62,00,\
- 6f,00,73,00,73,00
上方"开始行"和"结束行"是纯数字,,,复制代码
- @echo off&Setlocal EnableDelayedExpansion
- FOR /F "USEBACKQ DELIMS=" %%A IN ("文档位置或%0") DO (
- SET /A N+=1
- IF !N! GEQ 开始行 (IF !N! LEQ 结束行 ECHO %%A
- ))
欢迎光临 批处理之家 (http://www.bathome.net/) | Powered by Discuz! 7.2 |