HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductId not found running 32bit app on 64bit Windows

孤者浪人 提交于 2019-12-08 06:08:54

问题


As title really. Looking in regedit the key-value exists, but the Wow6432 key (HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion) doesn't have this key. This means a 32-bit app doesn't work on my 64-bit Windows version... which seems wrong, shouldn't the 32-bit app run without modifications? Or is this one case 32-bit apps have to be tweaked to work on 64bit Windows?


回答1:


Applications really shouldn't access this registry value directly. The best way to get this value is to use WMI to get the SerialNumber property of the Win32_OperatingSystem class. This works fine from a 32-bit application running on Win64.

An alternative would be to use the KEY_WOW64_64KEY flag when opening the registry key (does not work on Windows 2000.)



来源:https://stackoverflow.com/questions/3656515/hklm-software-microsoft-windows-nt-currentversion-productid-not-found-running-32

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!