Board logo

标题: [注册表类] 批处理如何批量添加列表域名或IP到指定键值(导入导出黑白名单)? [打印本页]

作者: Nano    时间: 2010-9-30 08:02     标题: 批处理如何批量添加列表域名或IP到指定键值(导入导出黑白名单)?

  1. rem -----------------------------for Internet Settings begin ---------------------------
  2. Rem Internet常规设置每次访问此页时检查(E)
  3. reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v SyncMode5 /t REG_DWORD /d 0x00000003 /f
  4. rem -----------------------------for Internet Settings end -----------------------------
  5. rem -----------------------------for Cache begin ---------------------------
  6. Rem 关闭IE时清空 Internet 临时文件夹
  7. reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Cache" /v Persistent /t REG_DWORD /d 0x00000000 /f
  8. rem -----------------------------for Cache end -----------------------------
  9. rem -----------------------------for Domains begin ---------------------------
  10. Rem 添加可信站点域名中国移动NGCRM系统xg.boss.hb.cmcc
  11. reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\hb.cmcc\xg.boss" /v http /t REG_DWORD /d 0x00000002 /f
  12. reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\hb.cmcc\xg.boss" /v https /t REG_DWORD /d 0x00000002 /f
  13. Rem 添加可信站点域名农行95599.cn
  14. reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\95599.cn" /v http /t REG_DWORD /d 0x00000002 /f
  15. reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\95599.cn" /v https /t REG_DWORD /d 0x00000002 /f
  16. Rem 添加可信站点域名农行abchina.com
  17. reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\abchina.com" /v http /t REG_DWORD /d 0x00000002 /f
  18. reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\abchina.com" /v https /t REG_DWORD /d 0x00000002 /f
  19. rem -----------------------------for Domains end -----------------------------
  20. rem -----------------------------for Ranges begin ---------------------------
  21. Rem 添加可信站点IP中国移动NGCRM系统DNS
  22. reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range100" /v * /t REG_DWORD /d 0x00000002 /f
  23. reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range100" /v :Range /t REG_SZ /d 10.25.*.* /f
  24. rem -----------------------------for Ranges end -----------------------------
  25. rem -----------------------------for Zones begin ---------------------------
  26. Rem IE安全设置提示下载未签名的 ActiveX 控件
  27. reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v 1004 /t REG_DWORD /d 0x00000001 /f
  28. Rem IE安全设置启用未标记为安全的 ActiveX 控件
  29. reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v 1201 /t REG_DWORD /d 0x00000000 /f
  30. rem -----------------------------for Zones end -----------------------------
复制代码
求助:如何批量添加如下域名到注册表
www.google.com.hk
www.sina.com.cn
http://ccclub.cmbchina.com等等
Domains\hb.cmcc\xg.boss也就是想把红色字段用变量替换。
Domains\google.com.hk\www
Domains\sina.com.cn\www
Domains\cmbchina.com\ccclub

[ 本帖最后由 Nano 于 2010-9-30 16:49 编辑 ]
作者: Nano    时间: 2010-9-30 16:44

  1. rem -----------------------------for Internet Explorer begin ---------------------------
  2. rem -----------------------------for Main begin ---------------------------
  3. Rem IE常规设置-更改主页
  4. reg add "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main" /v "Start Page" /d "http://xg.boss.hb.cmcc:8080/ngcrm/bsf/index.action" /f
  5. rem -----------------------------for Main end -----------------------------
  6. rem -----------------------------for New Windows begin ---------------------------
  7. Rem IE阻止弹出窗口(B)
  8. reg add "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\New Windows" /v PopupMgr /d yes /f
  9. Rem IE阻止弹出窗口时不播放声音(P)
  10. reg add "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\New Windows" /v PlaySound /t REG_DWORD /d 0x00000000 /f
  11. Rem IE阻止弹出窗口时不显示信息栏(I)
  12. reg add "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\New Windows" /v UseSecBand /t REG_DWORD /d 0x00000000 /f
  13. Rem IE阻止弹出窗口筛选级别(F):高:阻止所有弹出窗口(使用 Ctrl 替代)
  14. reg add "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\New Windows" /v BlockUserInit /t REG_DWORD /d 0x00000001 /f
  15. Rem IE阻止弹出窗口筛选级别(F):中:阻止大多数自动弹出窗口
  16. reg add "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\New Windows" /v UseHooks /t REG_DWORD /d 0x00000001 /f
  17. Rem IE阻止弹出窗口筛选级别(F):低:允许来自安全站点的弹出窗口
  18. reg add "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\New Windows" /v UseTimerMethod /t REG_DWORD /d 0x00000001 /f
  19. reg add "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\New Windows" /v AllowHTTPS /t REG_DWORD /d 0x00000001 /f
  20. rem -----------------------------for New Windows end -----------------------------
  21. rem -----------------------------for Internet Explorer end -----------------------------
  22. rem -----------------------------for Internet Settings begin ---------------------------
  23. Rem IE常规设置-每次访问此页时检查(E)
  24. reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v SyncMode5 /t REG_DWORD /d 0x00000003 /f
  25. rem -----------------------------for Cache begin ---------------------------
  26. Rem IE关闭时清空 Internet 临时文件夹
  27. reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Cache" /v Persistent /t REG_DWORD /d 0x00000000 /f
  28. rem -----------------------------for Cache end -----------------------------
  29. rem -----------------------------for Domains begin ---------------------------
  30. Rem 添加可信站点域名:中国移动NGCRM系统xg.boss.hb.cmcc
  31. reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\hb.cmcc\xg.boss" /v http /t REG_DWORD /d 0x00000002 /f
  32. reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\hb.cmcc\xg.boss" /v https /t REG_DWORD /d 0x00000002 /f
  33. rem -----------------------------for Domains end -----------------------------
  34. rem -----------------------------for Ranges begin ---------------------------
  35. Rem 添加可信站点IP:中国移动NGCRM系统DNS
  36. reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range100" /v * /t REG_DWORD /d 0x00000002 /f
  37. reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range100" /v :Range /t REG_SZ /d 10.25.*.* /f
  38. rem -----------------------------for Ranges end -----------------------------
  39. rem -----------------------------for Zones begin ---------------------------
  40. Rem IE安全设置-提示下载未签名的 ActiveX 控件
  41. reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v 1004 /t REG_DWORD /d 0x00000001 /f
  42. Rem IE安全设置-启用未标记为安全的 ActiveX 控件
  43. reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v 1201 /t REG_DWORD /d 0x00000000 /f
  44. rem -----------------------------for Zones end -----------------------------
  45. rem -----------------------------for Internet Settings end -----------------------------
  46. Pause
复制代码





欢迎光临 批处理之家 (http://bathome.net./) Powered by Discuz! 7.2