无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站广告联系 微信:wuyouceo QQ:184822951
楼主: lyh728
打印 上一主题 下一主题

【原创】reg2cmd

    [复制链接]
1#
发表于 2007-12-3 20:32:27 | 显示全部楼层
对其他type的直接支持有问题


  1. Windows Registry Editor Version 5.00
  2. [HKEY_CURRENT_USER\Software\EasyBoot Systems\EasyBoot\3.0]
  3. "New Value #1"=hex:ea,ee,aa,ea,ea,ee,a0
  4. "New Value #2"=dword:00000000
  5. "New Value #3"=hex(7):31,00,31,00,31,00,31,00,31,00,31,00,31,00,5c,00,22,00,7a,\
  6.   00,64,00,67,00,64,00,66,00,68,00,72,00,27,00,22,00,00,00,22,00,3a,00,67,00,\
  7.   64,00,7a,00,68,00,74,00,68,00,22,00,00,00,00,00
  8. "New Value #4"=hex(2):45,00,3a,00,5c,00,49,51,71,9a,e5,5d,77,51,5c,00,45,00,61,\
  9.   00,73,00,79,00,42,00,6f,00,6f,00,74,00,5c,00,69,00,73,00,6f,00,00,00
  10. "New Value #5"=hex(5):00,00,00,00
  11. "New Value #6"=hex(b):00,00,00,00,00,00,00,00
  12. "New Value #7"=hex(6):11,11,11,10
  13. "New Value #8"=hex(8):23,dd,50
  14. "New Value #9"=hex(9):ad,ad
  15. "New Value #10"=hex(a):35,34,5f,f0
复制代码




你的程序得到的结果:
  1. reg add "HKCU\Software\EasyBoot Systems\EasyBoot\3.0" /f /v "New Value #1" /t REG_BINARY /d eaeeaaeaeaeea0
  2. reg add "HKCU\Software\EasyBoot Systems\EasyBoot\3.0" /f /v "New Value #2" /t REG_DWORD /d 0
  3. reg add "HKCU\Software\EasyBoot Systems\EasyBoot\3.0" /f /v "New Value #3" /t REG_MULTI_SZ /d "1111111"zdgdfhr'"\0":gdzhth""
  4. reg add "HKCU\Software\EasyBoot Systems\EasyBoot\3.0" /f /v "New Value #4" /t REG_EXPAND_SZ /d "E:\光驱工具\EasyBoot\iso"
  5. reg add "HKCU\Software\EasyBoot Systems\EasyBoot\3.0" /f /v "New Value #5" /t REG_SZ /d hex(5):00,00,00,00
  6. reg add "HKCU\Software\EasyBoot Systems\EasyBoot\3.0" /f /v "New Value #6" /t REG_SZ /d hex(b):00,00,00,00,00,00,00,00
  7. reg add "HKCU\Software\EasyBoot Systems\EasyBoot\3.0" /f /v "New Value #7" /t REG_SZ /d hex(6):11,11,11,10
  8. reg add "HKCU\Software\EasyBoot Systems\EasyBoot\3.0" /f /v "New Value #8" /t REG_SZ /d hex(8):23,dd,50
  9. reg add "HKCU\Software\EasyBoot Systems\EasyBoot\3.0" /f /v "New Value #9" /t REG_SZ /d hex(9):ad,ad
  10. reg add "HKCU\Software\EasyBoot Systems\EasyBoot\3.0" /f /v "New Value #10" /t REG_SZ /d hex(a):35,34,5f,f0
复制代码


正确的表达式为:
  1. reg add "HKCU\Software\EasyBoot Systems\EasyBoot\3.0" /f /v "New Value #1" /t REG_BINARY /d eaeeaaeaeaeea0
  2. reg add "HKCU\Software\EasyBoot Systems\EasyBoot\3.0" /f /v "New Value #2" /t REG_DWORD /d 00000000
  3. reg add "HKCU\Software\EasyBoot Systems\EasyBoot\3.0" /f /v "New Value #3" /t REG_MULTI_SZ /d "1111111\\"zdgdfhr'"\0":gdzhth""
  4. reg add "HKCU\Software\EasyBoot Systems\EasyBoot\3.0" /f /v "New Value #4" /t REG_EXPAND_SZ /d "E:\光驱工具\EasyBoot\iso"
  5. reg add "HKCU\Software\EasyBoot Systems\EasyBoot\3.0" /f /v "New Value #5" /t REG_DWORD_BIG_ENDIAN /d 00000000
复制代码

其他几种类型 reg命令不支持的说

另:
reg add "HKCU\Software\EasyBoot Systems\EasyBoot\3.0" /f /v "New Value #2" /t REG_DWORD /d 0
最好改成标准写法
reg add "HKCU\Software\EasyBoot Systems\EasyBoot\3.0" /f /v "New Value #2" /t REG_DWORD /d 00000000
回复

使用道具 举报

2#
发表于 2007-12-26 23:55:33 | 显示全部楼层
以前有个reg2bat的P处理文件 但是存在不少问题
http://bbs.wuyou.net/forum.php?m ... 1368&highlight=

LZ 你这东东不错 就是文件大了点 不知 能否编译个小一点的东东的说
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2024-5-19 12:58

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表