* * *

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

theflakes

  • New member
  • *
  • 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: 5202
"Logically, no number of positive outcomes at the level of experimental testing can confirm a scientific theory, but a single counterexample is logically decisive."

ASerge

  • Hero Member
  • *****
  • Posts: 537
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;

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus