找回密码
 加入
搜索
查看: 4598|回复: 6

[系统综合] 读取64位系统的注册表总读取不到问题

[复制链接]
发表于 2013-4-30 22:15:10 | 显示全部楼层 |阅读模式
好长时间没来了,先向大家问候一下。

现在的64位系统逐渐普及了,原来在XP下写的代码需要修正了,以便适应于32位和64位两个系统,按理说读取注册表有个规矩的,就是64位系统中在主键上附一个“64”便可,如“HKLM64”,但发现这样处理还是无法读取到注册表项值。。

不知大家有无此问题?
发表于 2013-4-30 22:53:16 | 显示全部楼层
貌似没遇到~
倒是发现不管系统是64位或者32位,操作注册表加64总没错,即 HKLM64 既可以64位也可以兼容32位,而反之则不行,不知道是不是大家都一样…
发表于 2013-5-1 00:22:34 | 显示全部楼层
本帖最后由 ceoguang 于 2013-5-1 00:24 编辑

KEY_WOW64_32KEY (0x0200)
Indicates that an application on 64-bit Windows should operate on the 32-bit registry view. This flag is ignored by 32-bit Windows. For more information, see Accessing an Alternate Registry View.
This flag must be combined using the OR operator with the other flags in this table that either query or access registry values.
Windows 2000:  This flag is not supported.
KEY_WOW64_64KEY (0x0100)
Indicates that an application on 64-bit Windows should operate on the 64-bit registry view. This flag is ignored by 32-bit Windows. For more information, see Accessing an Alternate Registry View.
This flag must be combined using the OR operator with the other flags in this table that either query or access registry values.
Windows 2000:  This flag is not supported.
注意着色部份
更多信息参考http://msdn.microsoft.com/en-us/library/windows/desktop/aa384129(v=vs.85).aspx
发表于 2013-5-1 22:35:32 | 显示全部楼层
我也遇到过类似的问题,比如说这个注册表键位(32bit):
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft
在64bit的系统对应的位置就是
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft
在32bit系统上之行就编译成32bit的,在64bit的系统上运行时,脚本头上加上:#AutoIt3Wrapper_UseX64=y编译成64bit的试试。
不知道是不是跟你的情况一样,希望对你有帮助。
 楼主| 发表于 2013-5-4 10:06:46 | 显示全部楼层
回复 4# MicroBlue


    谢谢,你这个办法是输出64位的应用程序,输出结果只能用于64位系统,我想要得到一个2种系统下都能运行的东西。
 楼主| 发表于 2013-5-4 10:15:01 | 显示全部楼层
貌似没遇到~
倒是发现不管系统是64位或者32位,操作注册表加64总没错,即 HKLM64 既可以64位也可以兼容32位 ...
afan 发表于 2013-4-30 22:53



    谢谢老朋友afan,你这也算不错的发现哈。有空我也研究一下
 楼主| 发表于 2013-5-4 10:16:58 | 显示全部楼层
回复 3# ceoguang

谢谢,我去看看
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-17 17:42 , Processed in 0.077668 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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