找回密码
 加入
搜索
查看: 1998|回复: 3

[AU3基础] 写入注册表二进制问题

[复制链接]
发表于 2010-6-3 14:35:48 | 显示全部楼层 |阅读模式
原来在注册表中,导出的注册表内容为:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\ES-Computing\EditPlus 3\Install]
"License"=hex:db,89,29,18,04,5e,0f,5e,78,9c,e3,f1,54,f0,c9,2f,4b,55,70,ce,c8,\
  cc,4b,94,35,34,77,b4,34,d0,75,b5,30,35,b3,d0,35,b2,8c,32,77,d6,35,b4,0c,37,\
  75,d2,35,37,0b,31,b1,04,00,f6,37,0a,b7

用注册表转换工具转换为:
RegWrite('HKEY_LOCAL_MACHINE\SOFTWARE\ES-Computing\EditPlus 3\Install')
RegWrite('HKEY_LOCAL_MACHINE\SOFTWARE\ES-Computing\EditPlus 3\Install', 'License', 'REG_BINARY', 'db892918045e0f5e789ce3f154f0c92f4b5570cec8cc4b94353477b434d075b53035b3d035b28c3277d635b40c3775d235370b31b10400f6370ab7')

运行 上面AU3代码后到注册表中查看结果,跟原来的注册表内容不一样。变成了:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\ES-Computing\EditPlus 3\Install]
"License"=hex:64,62,2c,38,39,2c,32,39,2c,31,38,2c,30,34,2c,35,65,2c,30,66,2c,\
  35,65,2c,37,38,2c,39,63,2c,65,33,2c,66,31,2c,35,34,2c,66,30,2c,63,39,2c,32,\
  66,2c,34,62,2c,35,35,2c,37,30,2c,63,65,2c,63,38,2c,63,63,2c,34,62,2c,39,34,\
  2c,33,35,2c,33,34,2c,37,37,2c,62,34,2c,33,34,2c,64,30,2c,37,35,2c,62,35,2c,\
  33,30,2c,33,35,2c,62,33,2c,64,30,2c,33,35,2c,62,32,2c,38,63,2c,33,32,2c,37,\
  37,2c,64,36,2c,33,35,2c,62,34,2c,30,63,2c,33,37,2c,37,35,2c,64,32,2c,33,35,\
  2c,33,37,2c,30,62,2c,33,31,2c,62,31,2c,30,34,2c,30,30,2c,66,36,2c,33,37,2c,\
  30,61,2c,62,37

这是为何原因?!
 楼主| 发表于 2010-6-3 14:40:30 | 显示全部楼层
解决了。。。原来 需要在 db892918045e0f5e789ce3前面加上0x (零X)就可以了。
发表于 2010-6-3 21:14:09 | 显示全部楼层
新手路过,先标记一下
发表于 2010-6-4 02:35:31 | 显示全部楼层
回复 3# yejier1983

新手,说一句,二进制在注册表里是以16进制表达的,当然,你完全可以用0和1去写,不过累了点
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-11-16 02:33 , Processed in 0.124411 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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