Board logo

标题: [文本处理] 请教高手,批处理怎么递增并自动转注册表16进制? [打印本页]

作者: 768768521    时间: 2017-7-26 22:35     标题: 请教高手,批处理怎么递增并自动转注册表16进制?

注册表文件文本格式如下

空行 为第一行
[HKEY_LOCAL_MACHINE\SOFTWARE\LavaSoft\ezProxy\Setting\Service\1101]
"Attrib"=dword:00000000
"Type"=dword:00000008
"Descrip"=""
"Binding"="0.0.0.0"
"Port"=dword:0000044d
"Startup"=dword:00000000
"Timeout"=dword:00000000
"Debug"=dword:00000000
"CascadType"=dword:00000002
"CascadServer"="125.25.25.25"
"CascadPort"=dword:0000044d
"Default"=dword:00000002

[HKEY_LOCAL_MACHINE\SOFTWARE\LavaSoft\ezProxy\Setting\Service\1101\Policy]

[HKEY_LOCAL_MACHINE\SOFTWARE\LavaSoft\ezProxy\Setting\Service\1101\Policy\1]
"name"="pol"
总共20行


需要以为递增方式增加或叫生成到1101-26000以以上数据为起始
一共需要递增的地方有
第2行  7行   13行    16行   18行
2,16,18都是数字类  以递增方式1101一直到26000
7行   13行 对应的是十六进制递增也是1101的十六进制递增一直到26000,   麻烦高手大哥指导求救



总目的想达到的最终能够效果例如下列






[HKEY_LOCAL_MACHINE\SOFTWARE\LavaSoft\ezProxy\Setting\Service\1101]
"Attrib"=dword:00000000
"Type"=dword:00000008
"Descrip"=""
"Binding"="0.0.0.0"
"Port"=dword:0000044d
"Startup"=dword:00000000
"Timeout"=dword:00000000
"Debug"=dword:00000000
"CascadType"=dword:00000002
"CascadServer"="125.25.25.25"
"CascadPort"=dword:0000044d
"Default"=dword:00000002

[HKEY_LOCAL_MACHINE\SOFTWARE\LavaSoft\ezProxy\Setting\Service\1101\Policy]

[HKEY_LOCAL_MACHINE\SOFTWARE\LavaSoft\ezProxy\Setting\Service\1101\Policy\1]
"name"="pol"

[HKEY_LOCAL_MACHINE\SOFTWARE\LavaSoft\ezProxy\Setting\Service\1102]
"Attrib"=dword:00000000
"Type"=dword:00000008
"Descrip"=""
"Binding"="0.0.0.0"
"Port"=dword:0000044e
"Startup"=dword:00000000
"Timeout"=dword:00000000
"Debug"=dword:00000000
"CascadType"=dword:00000002
"CascadServer"="125.25.25.25"
"CascadPort"=dword:0000044e
"Default"=dword:00000002

[HKEY_LOCAL_MACHINE\SOFTWARE\LavaSoft\ezProxy\Setting\Service\1102\Policy]

[HKEY_LOCAL_MACHINE\SOFTWARE\LavaSoft\ezProxy\Setting\Service\1102\Policy\1]
"name"="pol"

[HKEY_LOCAL_MACHINE\SOFTWARE\LavaSoft\ezProxy\Setting\Service\1103]
"Attrib"=dword:00000000
"Type"=dword:00000008
"Descrip"=""
"Binding"="0.0.0.0"
"Port"=dword:0000044f
"Startup"=dword:00000000
"Timeout"=dword:00000000
"Debug"=dword:00000000
"CascadType"=dword:00000002
"CascadServer"="125.25.25.25"
"CascadPort"=dword:0000044f
"Default"=dword:00000002

[HKEY_LOCAL_MACHINE\SOFTWARE\LavaSoft\ezProxy\Setting\Service\1103\Policy]

[HKEY_LOCAL_MACHINE\SOFTWARE\LavaSoft\ezProxy\Setting\Service\1103\Policy\1]
"name"="pol"



以上为列要一直到1101一直要到26000这样我最终导入注册,请高手哥哥指导下~~~~~~~~~~~~~在此感激
作者: 768768521    时间: 2017-8-5 11:43

怎么使用啊  没看明白~???请指导
作者: Batcher    时间: 2017-8-5 17:06

回复 3# 768768521


PowerShell脚本这样执行:
http://bbs.bathome.net/thread-31071-1-1.html




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