Recent

Author Topic: Read LastWriteTime of registry node  (Read 3413 times)

theflakes

  • Newbie
  • Posts: 5
Read LastWriteTime of registry node
« on: January 12, 2018, 03:26:09 pm »
Is there a way to read the last write time of a registry node?  I can read values of varying types but not finding how to get the "LastWriteTime" of a node.

thanks

Thaddy

  • Hero Member
  • *****
  • Posts: 14214
  • Probably until I exterminate Putin.
Specialize a type, not a var.

ASerge

  • Hero Member
  • *****
  • Posts: 2223
Re: Read LastWriteTime of registry node
« Reply #2 on: January 12, 2018, 10:46:53 pm »
Is there a way to read the last write time of a registry node?  I can read values of varying types but not finding how to get the "LastWriteTime" of a node.
Code: Pascal  [Select][+][-]
  1. uses Registry;
  2.  
  3. procedure TForm1.FormCreate(Sender: TObject);
  4. var
  5.   R: TRegistry;
  6.   Info: TRegKeyInfo;
  7. begin
  8.   R := TRegistry.Create;
  9.   try
  10.     R.RootKey := HKEY_CURRENT_USER;
  11.     if R.OpenKeyReadOnly('Control Panel') then
  12.       if R.GetKeyInfo(Info) then
  13.         Caption := DateTimeToStr(Info.FileTime);
  14.   finally
  15.     R.Free;
  16.   end;
  17. end;

 

TinyPortal © 2005-2018