Are you running your application with elevated access rights as administrator or as a normal user.
When you are using OpenKey Delphi by default tries to access that registry key using Read and Write access.
Now on Windows XP this would be just fine but on Windows Vista and newer this can be blocked by UAC especially if you are trying to read registry contents from HKEY_LOCAL_MACHINE part because this part of the registry is protected and requires elevated privileges to be modified.
So you need either to launch your application with administrative rights or change the Access property to `KEY_READ'. I would recommend using the lather if you are only enumerating the USB devices.
Asked in February 2016Viewed 2,039 timesVoted 5Answered 2 times