If you are running a 32 bit app on a 64 bit machine (I am using windows 7) and you write this code
RegistryKey key = Registry.LocalMachine.OpenSubKey(@"Software\XXX")
it will actually get the key from
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\XXX
and not
HKEY_LOCAL_MACHINE\SOFTWARE\XXX
Progromatically given a RegistryKey how do i work out the true path in the registry?