views:

42

answers:

2

I have a little app which reads registry key string values. It works well but for some reason it fails on this key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductId Despite working on other values of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\

It also fails on `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography\MachineGuid'

I am running as an admin, is this a factor? I'm running W7 64bit, another W7 machine and Vista machine both work fine. My only guesses are some permissioning issue, or related to me running 64-bit.

Any ideas?

update: It appears to be something to do with my system running Windows 64bit, and \Software\Wow6432Node\. I don't know what that is though. I have both \Software\Wow6432Node\Microsoft\Windows NT\CurrentVersion\ and \Software\Microsoft\Windows NT\CurrentVersion\ but only the latter contains ProductId value... for some reason when I ask for the key Windows is apparently looking in the Wow6432Node

We're using wxWidgets but could probably use some win32 code directly if needed... our app is a 32bit application but target PCs could be running 32 or 64 bit versions of Windows

A: 

I just looked at my registry and there's no key at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductId or MachineGuid, this is on Win7 64-bit

James
When I run regedit, I see ProductId in `SOFTWARE\Microsoft\Windows NT\CurrentVersion\` but not `SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\`. Can I force regedit to work in 32/64 bit mode?
John
A: 

It's due to WOW64. This other question focuses on the details.

John