[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖

[注册表类] 如何将以下两个修改注册表的BAT代码合并?

第一个代码是设置IE安全,第二个代码是设置兼容性视图,怎么将两个代码合并为一个

第一个:
  1. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range10" /v ":Range" /t REG_SZ /d 10.46.3.12 /f
  2. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range10" /v "http" /t REG_DWORD /d 2 /f
  3. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1001" /t REG_DWORD /d 0 /f
  4. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1004" /t REG_DWORD /d 0 /f
  5. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1200" /t REG_DWORD /d 0 /f
  6. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1201" /t REG_DWORD /d 0 /f
  7. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1405" /t REG_DWORD /d 0 /f
  8. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "2201" /t REG_DWORD /d 0 /f
  9. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1208" /t REG_DWORD /d 0 /f
  10. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1809" /t REG_DWORD /d 1 /f
  11. @echo off
  12. echo 设置成功,请关闭IE重启
  13. pause
复制代码
第二个:
  1. @echo off
  2. >"%tmp%\t.reg" more +5 "%~f0"
  3. regedit /s "%tmp%\t.reg"
  4. echo;OA设置已成功,请重启IE浏览器
  5. ping /n 2 0 >nul& exit
  6. Windows Registry Editor Version 5.00
  7. [HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\BrowserEmulation\ClearableListData]
  8. "UserFilter"=hex:41,1f,00,00,53,08,ad,ba,05,00,00,00,c8,00,00,00,01,00,00,00,\
  9.   05,00,00,00,0c,00,00,00,b1,29,79,f6,e0,b2,d4,01,01,00,00,00,09,00,31,00,30,\
  10.   00,2e,00,34,00,36,00,2e,00,33,00,2e,00,38,00,0c,00,00,00,de,1a,ac,0c,e1,b2,\
  11.   d4,01,01,00,00,00,0a,00,31,00,30,00,2e,00,34,00,36,00,2e,00,33,00,2e,00,31,\
  12.   00,32,00,0c,00,00,00,80,15,fa,e2,e2,b2,d4,01,01,00,00,00,0a,00,31,00,30,00,\
  13.   2e,00,34,00,36,00,2e,00,33,00,2e,00,32,00,32,00,0c,00,00,00,8c,cc,f6,e5,e2,\
  14.   b2,d4,01,01,00,00,00,0a,00,31,00,30,00,2e,00,36,00,33,00,2e,00,31,00,2e,00,\
  15.   38,00,35,00,0c,00,00,00,6d,a3,39,e8,e2,b2,d4,01,01,00,00,00,0a,00,31,00,30,\
  16.   00,2e,00,36,00,33,00,2e,00,31,00,2e,00,38,00,38,00
复制代码

  1. @echo off
  2. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range10" /v ":Range" /t REG_SZ /d 10.46.3.12 /f
  3. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range10" /v "http" /t REG_DWORD /d 2 /f
  4. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1001" /t REG_DWORD /d 0 /f
  5. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1004" /t REG_DWORD /d 0 /f
  6. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1200" /t REG_DWORD /d 0 /f
  7. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1201" /t REG_DWORD /d 0 /f
  8. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1405" /t REG_DWORD /d 0 /f
  9. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "2201" /t REG_DWORD /d 0 /f
  10. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1208" /t REG_DWORD /d 0 /f
  11. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1809" /t REG_DWORD /d 1 /f
  12. for /f "delims=:" %%i in ('findstr /n "^:DynamicScript$" "%~f0"') do (
  13.     more +%%i "%~f0" > "%tmp%\t.reg"
  14. )
  15. regedit /s "%tmp%\t.reg"
  16. echo 设置成功,请关闭IE重启
  17. pause
  18. goto :eof
  19. REM 请确保待生成的文本位于脚本的末尾
  20. :DynamicScript
  21. Windows Registry Editor Version 5.00
  22. [HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\BrowserEmulation\ClearableListData]
  23. "UserFilter"=hex:41,1f,00,00,53,08,ad,ba,05,00,00,00,c8,00,00,00,01,00,00,00,\
  24.   05,00,00,00,0c,00,00,00,b1,29,79,f6,e0,b2,d4,01,01,00,00,00,09,00,31,00,30,\
  25.   00,2e,00,34,00,36,00,2e,00,33,00,2e,00,38,00,0c,00,00,00,de,1a,ac,0c,e1,b2,\
  26.   d4,01,01,00,00,00,0a,00,31,00,30,00,2e,00,34,00,36,00,2e,00,33,00,2e,00,31,\
  27.   00,32,00,0c,00,00,00,80,15,fa,e2,e2,b2,d4,01,01,00,00,00,0a,00,31,00,30,00,\
  28.   2e,00,34,00,36,00,2e,00,33,00,2e,00,32,00,32,00,0c,00,00,00,8c,cc,f6,e5,e2,\
  29.   b2,d4,01,01,00,00,00,0a,00,31,00,30,00,2e,00,36,00,33,00,2e,00,31,00,2e,00,\
  30.   38,00,35,00,0c,00,00,00,6d,a3,39,e8,e2,b2,d4,01,01,00,00,00,0a,00,31,00,30,\
  31.   00,2e,00,36,00,33,00,2e,00,31,00,2e,00,38,00,38,00
复制代码
我帮忙写的代码不需要付钱。如果一定要给,请在微信群或QQ群发给大家吧。
【微信公众号、微信群、QQ群】http://bbs.bathome.net/thread-3473-1-1.html
【支持批处理之家,加入VIP会员!】http://bbs.bathome.net/thread-67716-1-1.html

TOP

回复 2# Batcher


    谢谢,很好用

TOP

返回列表