I'm trying to read HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run with OpenKeyReadOnly
, and GetValueNames
, but it's returning values from HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run instead.
How can I read the 64-bit values instead of from a redirect to the 32-bit key?
The program was run as an administrative account. I also tried RegOpenKeyEx
and RegEnumValue
.
I'm using Delphi 2010.
Best Answer
you must use the
KEY_WOW64_64KEY
value when open the Registry with theTRegistry
class.from MSDN :
try this sample app.