Lazarus

Programming => Operating Systems => Windows => Topic started by: theflakes on January 12, 2018, 03:26:09 pm

Title: Read LastWriteTime of registry node
Post by: theflakes 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
Title: Re: Read LastWriteTime of registry node
Post by: Thaddy on January 12, 2018, 03:51:31 pm
https://gallery.technet.microsoft.com/scriptcenter/Get-Last-Write-Time-and-06dcf3fb
Title: Re: Read LastWriteTime of registry node
Post by: ASerge 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