Windows 64位操作系统和32位操作系统在注册表上的有一点不一样
Windows 64位操作系统为提供对32位应用程序的兼容,在“C:\Windows\SysWOW64”目录下保留了很多32位的工具(如CMD.exe是32位的)。在Windows 64位操作系统上跑三十二位应用程序,操作注册表,搜素目录时,微软通过反射(Reflector),会将“\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall”替换为"\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall",即在SOFTWARE后面补上Wow6432Node。所以如果是64位脚本程序,在64位操作系统上,通过注册表操作32位应用程序,得手动通过代码补上“Wow6432Node”,否则会找不到。
参考(Reference:)
http://support.microsoft.com/default.aspx?scid=kb;en-us;896459
-
The Wow6432 registry entry indicates that you're running a 64-bit version of Windows. The OS uses this key to present a separate view of HKEY_LOCAL_MACHINE\SOFTWARE for 32-bit applications that run on a 64-bit version of Windows. When a 32-bit application queries a value under the HKEY_LOCAL_MACHINE\SOFTWARE\<company>\<product> subkey, the application reads from the HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\<company>\ <product> subkey.