Hi,
I am readings strings from the registry (using TRegistry) ... code like this works like a charm with an admin account, but returns an empty string when run by a restricted user:
procedure TForm1.Button3Click(Sender: TObject);
var
ARegistry: TRegistry;
begin
ARegistry := TRegistry.Create;
ARegistry.RootKey := HKEY_LOCAL_MACHINE;
ARegistry.OpenKey('\Software\Microsoft\Windows NT\CurrentVersion', False);
Caption := ARegistry.ReadString('ProductId');
ARegistry.Free;
end;
I can, however, access the value w/o problems in registry editor. Can anyone provide me with an explanation/solution?
Thanks!