Board logo

标题: [注册表类] [已解决] 两个修改注册表的批处理怎样合并成一个? [打印本页]

作者: zhizhewuyou    时间: 2018-12-4 12:56     标题: [已解决] 两个修改注册表的批处理怎样合并成一个?

本帖最后由 zhizhewuyou 于 2018-12-4 20:12 编辑

求助大神,把两个批处理文件合并成一个,运行后两个批处理都生效,在此谢过

第一个批处理
  1. @echo off
  2. >"%tmp%\t.reg" more +5 "%~f0"
  3. regedit /s "%tmp%\t.reg"
  4. echo;兼容性视图设置已修改,请重启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,a4,00,00,00,01,00,00,00,\
  9.   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,\
  10.   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,\
  11.   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,\
  12.   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,\
  13.   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,\
  14.   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,\
  15.   6f,00,73,00,73,00
复制代码
第二个批处理
  1. @ECHO OFF
  2. ECHO 开始系统设置
  3. ECHO 该设置不会对您的电脑使用带来影响
  4. ECHO ---增加信任站点
  5. cd c:\windows\system32
  6. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\sd.cmcc\*" /f > nul
  7. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\sd.cmcc\*" /v "*"     /t REG_DWORD /d 2  /f > nul
  8. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\chinamobile.com\*" /f > nul
  9. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\chinamobile.com\*" /v "*"     /t REG_DWORD /d 2  /f > nul
  10. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\10086.cn\*" /f > nul
  11. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\10086.cn\*" /v "*"     /t REG_DWORD /d 2  /f > nul  
  12. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\sdboss.com\*" /f > nul
  13. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\sdboss.com\*" /v "*"     /t REG_DWORD /d 2   /f > nul   
  14. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\hq.cmcc\*" /f > nul
  15. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\hq.cmcc\*" /v "*"     /t REG_DWORD /d 2  /f > nul   
  16. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\sd4a.com\*" /f > nul
  17. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\sd4a.com\*" /v "*"     /t REG_DWORD /d 2  /f > nul
  18. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range101" /f > nul
  19. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range101" /v ":Range" /t REG_SZ          /d "10.*.*.*" /f > nul
  20. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range101" /v "*"     /t REG_DWORD /d 2                        /f > nul
  21. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range102" /f > nul
  22. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range102" /v ":Range" /t REG_SZ          /d "134.*.*.*" /f > nul
  23. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range102" /v "*"     /t REG_DWORD /d 2                        /f > nul
  24. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range102" /f > nul
  25. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range102" /v ":Range" /t REG_SZ          /d "133.*.*.*" /f > nul
  26. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range102" /v "*"     /t REG_DWORD /d 2                        /f > nul
  27. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range102" /f > nul
  28. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range102" /v ":Range" /t REG_SZ          /d "*a.boss*" /f > nul
  29. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range102" /v "*"     /t REG_DWORD /d 2                        /f > nul
  30. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range102" /f > nul
  31. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range102" /v ":Range" /t REG_SZ          /d "*b.boss*" /f > nul
  32. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range102" /v "*"     /t REG_DWORD /d 2                        /f > nul
  33. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range102" /f > nul
  34. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range102" /v ":Range" /t REG_SZ          /d "*c.boss*" /f > nul
  35. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range102" /v "*"     /t REG_DWORD /d 2                        /f > nul
  36. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range102" /f > nul
  37. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range102" /v ":Range" /t REG_SZ          /d "*d.boss*" /f > nul
  38. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range102" /v "*"     /t REG_DWORD /d 2                        /f > nul
  39. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range102" /f > nul
  40. 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
  41. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range102" /v "*"     /t REG_DWORD /d 2                        /f > nul
  42. ECHO ---设置IE信任区域
  43. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "DisplayName" /t REG_SZ          /d "可信站点"   /f > nul
  44. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "CurrentLeve1" /t REG_DWORD /d 0x00001000 /f > nul
  45. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "Flags"             /t REG_DWORD /d 0x00000043 /f > nul
  46. REM 1405:标记为安全可执行的ActiveX控件执行
  47. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1405"              /t REG_DWORD /d 0x00000000 /f > nul
  48. REM 1001:下载已签名的ActiveX控件
  49. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1001"              /t REG_DWORD /d 0x00000000 /f > nul
  50. REM 1004:下载未签名的ActiveX控件
  51. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1004"              /t REG_DWORD /d 0x00000000 /f > nul
  52. REM 1200:运行ActiveX控件和插件
  53. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1200"              /t REG_DWORD /d 0x00000000 /f > nul
  54. REM 1201:执行没有标记为安全的ActiveX控件
  55. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1201"              /t REG_DWORD /d 0x00000000 /f > nul
  56. REM 1402:Java小程序脚本
  57. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1402"              /t REG_DWORD /d 0x00000000 /f > nul
  58. REM 2201:ActiveX控件自动提示
  59. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "2201"              /t REG_DWORD /d 0x00000000 /f > nul
  60. REM  1208:允许运行以前未使用的Activex控件而不提示 0-启用 3-禁用(默认)
  61. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1208"              /t REG_DWORD /d 0x00000000 /f > nul
  62. REM  120B:仅允许经过批准的域在未经提示的情况下使用Activex:0-禁用 3-启用(默认)
  63. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "120B"              /t REG_DWORD /d 0x00000000 /f > nul
  64. REM  120A:在没有使用外部媒体播放机的网页上显示视频和动画
  65. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "120A"              /t REG_DWORD /d 0x00000000 /f > nul
  66. REM  1209:允许Scriptlet
  67. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1209"              /t REG_DWORD /d 0x00000000 /f > nul
  68. REM  1809:使用弹出窗口阻止程序
  69. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1809"              /t REG_DWORD /d 0x00000003 /f > nul
  70. REM  2000:二进制和脚本行为
  71. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "2000"              /t REG_DWORD /d 0x00000000 /f > nul
  72. REM  1407:允许对剪贴板进行编程访问
  73. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1407"              /t REG_DWORD /d 0x00000000 /f > nul
  74. REM  1609:显示混合内容 *
  75. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1609"              /t REG_DWORD /d 0x00000000 /f > nul
  76. REM  2300:允许网页为活动内容使用受限制的协议
  77. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "2300"              /t REG_DWORD /d 0x00000000 /f > nul
  78. REM  1804:在 IFRAME 中加载程序和文件
  79. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1804"              /t REG_DWORD /d 0x00000000 /f > nul
  80. REM  1800:桌面项目的安装
  81. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1800"              /t REG_DWORD /d 0x00000000 /f > nul
  82. REM  1607:跨域浏览子框架
  83. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1607"              /t REG_DWORD /d 0x00000000 /f > nul
  84. REM  1A04:没有证书或只有一个证书时不提示选择客户证书
  85. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1A04"              /t REG_DWORD /d 0x00000000 /f > nul
  86. REM  1406:通过域访问数据资源
  87. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1406"              /t REG_DWORD /d 0x00000000 /f > nul
  88. REM  1206:允许 Internet Explorer Webbrowser 控件的脚本
  89. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1206"              /t REG_DWORD /d 0x00000000 /f > nul
  90. REM  2102:允许由脚本初始化的窗口,没有大小和位置限制
  91. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "2102"              /t REG_DWORD /d 0x00000000 /f > nul
  92. REM  2200:文件下载自动提示
  93. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "2200"              /t REG_DWORD /d 0x00000000 /f > nul
  94. REM 1405:标记为安全可执行的ActiveX控件执行
  95. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3" /v "1405"              /t REG_DWORD /d 0x00000000 /f > nul
  96. REM 1004:下载未签名的ActiveX控件
  97. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3" /v "1004"              /t REG_DWORD /d 0x00000001 /f > nul
  98. REM 1201:执行没有标记为安全的ActiveX控件
  99. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3" /v "1201"              /t REG_DWORD /d 0x00000001 /f > nul
  100. REM 2201:ActiveX控件自动提示
  101. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3" /v "2201"              /t REG_DWORD /d 0x00000000 /f > nul
  102. REM  1208:允许运行以前未使用的Activex控件而不提示 0-启用 3-禁用(默认)
  103. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3" /v "1208"              /t REG_DWORD /d 0x00000000 /f > nul
  104. REM  120A:在没有使用外部媒体播放机的网页上显示视频和动画
  105. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3" /v "120A"              /t REG_DWORD /d 0x00000000 /f > nul
  106. REM  1209:允许Scriptlet
  107. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3" /v "1209"              /t REG_DWORD /d 0x00000000 /f > nul
  108. REM  1809:使用弹出窗口阻止程序
  109. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3" /v "1809"              /t REG_DWORD /d 0x00000003 /f > nul
  110. REM  :禁用“启用选项卡浏览”
  111. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\TabbedBrowsing" /v "Enabled"              /t REG_DWORD /d 0x00000000 /f > nul
  112. REM  :启用隐私-高级“替代自动cookie处理”
  113. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v "PrivacyAdvanced"              /t REG_DWORD /d 0x00000001 /f > nul
  114. ECHO 设置内存保护
  115. REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\AdvancedOptions\CRYPTO\NX" /v UncheckedValue   /f> nul
  116. REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\AdvancedOptions\CRYPTO\NX" /v "UncheckedValue"  /t REG_DWORD /d 0x00000001 /f > nul
  117. REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\AdvancedOptions\CRYPTO\NX" /v CheckedValue   /f> nul
  118. REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\AdvancedOptions\CRYPTO\NX" /v "CheckedValue"  /t REG_DWORD /d 0x00000000 /f > nul
  119. REM :检查所存网页的较新版本 自动  
  120. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v "SyncMode5"  /t REG_DWORD /d 0x00000004 /f > nul
  121. REM :关闭 IE8 "启用内存保护帮助减少联机攻击"
  122. REG ADD "HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Main" /v "DEPOff"  /t REG_DWORD /d 0x00000001 /f > nul
  123. REM 设置不使用兼容视图 HKCU\Software\Microsoft\Internet Explorer\BrowserEmulation\ClearableListData
  124. ECHO 设置不使用兼容视图
  125. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\BrowserEmulation" /v AllSitesCompatibilityMode /t REG_DWORD /d 0x00000000 /f > nul
  126. ECHO 设置IE8不自动切换兼容视图
  127. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\BrowserEmulation" /v AutomaticLayoutRecovery /t REG_DWORD /d 0x00000000 /f > nul
  128. ECHO 特定网站使用兼容视图
  129. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\BrowserEmulation" /v IntranetCompatibilityMode /t REG_DWORD /d 0x00000000 /f > nul
  130. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\BrowserEmulation" /v MSCompatibilityMode /t REG_DWORD /d 0x00000000 /f > nul
  131. ECHO 设置IE新打开窗口不共享cookie
  132. ECHO y | REG DELETE "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main" /v  "TabProcGrowth"
  133. ECHO y | REG DELETE "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main" /v  "XMLHTTP"
  134. ECHO y | REG DELETE "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\PageSetup" /v  "Print_Background"
  135. ECHO 设置IE11参数
  136. REM 32位方式运行
  137. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main" /v "TabProcGrowth"              /t REG_DWORD /d "1" /f > nul
  138. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main" /v "Isolation" /t REG_SZ    /d "PMIL"  /f > nul
  139. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main" /v "XMLHTTP"              /t REG_DWORD /d 0x00000001 /f > nul
  140. REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\PageSetup" /v "Print_Background" /t REG_SZ    /d "yes"  /f > nul
  141. ECHO 设置完成
复制代码

作者: Batcher    时间: 2018-12-4 13:10

把这段代码放到第二个脚本结尾
  1. for /f "delims=:" %%i in ('findstr /n "^:DynamicScript$" "%~f0"') do (
  2.     more +%%i "%~f0" > "%tmp%\t.reg"
  3. )
  4. regedit /s "%tmp%\t.reg"
  5. echo;兼容性视图设置已修改,请重启IE浏览器
  6. ping /n 2 0 >nul
  7. goto :eof
  8. REM 请确保待生成的文本位于脚本的末尾
  9. :DynamicScript
  10. Windows Registry Editor Version 5.00
  11. [HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\BrowserEmulation\ClearableListData]
  12. "UserFilter"=hex:41,1f,00,00,53,08,ad,ba,05,00,00,00,a4,00,00,00,01,00,00,00,\
  13.   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,\
  14.   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,\
  15.   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,\
  16.   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,\
  17.   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,\
  18.   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,\
  19.   6f,00,73,00,73,00
复制代码
参考:批处理动态生成脚本或文件
https://mp.weixin.qq.com/s/McvY4CiR-SYGaCha7lmjIw
作者: cd309420    时间: 2018-12-4 18:27

管理辛苦了
作者: zhizhewuyou    时间: 2018-12-4 19:48

管理一出手,果然不一样。非常感谢
作者: jiavip    时间: 2018-12-7 06:00

本帖最后由 jiavip 于 2018-12-7 06:03 编辑

其实还可以有个写法。可以读取任意行数段内的内容。。
  1. @echo off&Setlocal EnableDelayedExpansion
  2. FOR /F "USEBACKQ DELIMS=" %%A IN ("文档位置或%0") DO (
  3. SET /A N+=1
  4. IF !N! GEQ 开始行 (IF !N! LEQ 结束行 ECHO %%A
  5. ))
复制代码
上方"开始行"和"结束行"是纯数字,,,
这写法不读取空格行,实际行数需要检验一下。
若要输出文件则把ECHO %%A 加个>>文件.TAT 即可
这写法可以做到同一个BAT脚本输出多个文件。




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