1

I am trying to read the 64-bit HKLM\SOFTWARE registry key from a 32-bit (C#) application. This, of course, keeps redirecting my view to HKLM\SOFTWARE\Wow6432Node.

According to what I've found this is doable, but I can't seem to find a .NET example anywhere. I just need to read; not write. Anyone ran across this before?

Brian R. Bondy
  • 339,232
  • 124
  • 596
  • 636
Lance
  • 5,655
  • 4
  • 30
  • 32
  • 2
    possible duplicate of [C# Reading the registry and Wow6432Node key](http://stackoverflow.com/questions/2039186/c-reading-the-registry-and-wow6432node-key) – Powerlord Jun 14 '10 at 19:34
  • @R. Bremrose: Based on what I read, I don't think it is a duplicate. However, I think I may just go with one of the suggestions on that post and just not bother with doing it right. ;) Thanks for the link over though. If that fixes my issue then I'll remove to avoid any possible duplication. – Lance Jun 14 '10 at 19:44
  • As far as I can tell, this is only an issue on Windows Vista, as the Wow6432 nodes went away again in Windows 7. – Powerlord Jun 14 '10 at 19:56
  • @R. Bremrose: No need to cheat myself, as the answer below was exactly what was needed. Still want me to delete for dupe? I'm not seeing anything there about that new feature (which was the key to my puzzle). – Lance Jun 14 '10 at 20:03
  • 2
    I answered this question because the older SO question was pre-.NET 4.0 (before the RegistryView enumeration was added). So - while the question is similar - the answers are different. :) – Stephen Cleary Jun 14 '10 at 20:14

1 Answers1

3

The managed equivalent is the RegistryView enumeration (added in .NET 4.0).

Stephen Cleary
  • 437,863
  • 77
  • 675
  • 810