Failed to get data from registry key |
|
I'm trying to read a registry key like this:
Reg := TRegistry.Create;
Reg.RootKey := HKEY_CURRENT_USER;
try
if Reg.OpenKeyReadOnly('\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\') then begin
SecureProtocols := Reg.ReadInteger('SecureProtocols');
Reg.CloseKey;
end;
finally
Reg.Free;
end;
and sometimes, not always, I get this error:
Failed to get data for 'SecureProtocols'
Any idea why this happens?
Thanks
|