Board index » delphi » Windows registry...

Windows registry...

Can someone tell my how to obtain inforrmation form the Windows registry...?

Thanks, Elko.

 

Re:Windows registry...


Use the Registry unit, e.g.

uses
  Registry;

function GetFirstInstallDateTime: TDateTime;
var
  R: TRegistry;
begin
  R := TRegistry.Create;
  try
    R.RootKey := HKEY_LOCAL_MACHINE;
    if R.OpenKeyReadOnly('Software\Microsoft\Windows\CurrentVersion') then
      R.ReadBinaryData('FirstInstallDateTime', Result, SizeOf(Result))
    else
      Result := 0.0;
  finally
    R.Free;
  end;
end;

"Elko" <e.vandenbus...@business-review.com> schreef in bericht
news:9bmse8$n0o$1@news1.xs4all.nl...

Quote
> Can someone tell my how to obtain inforrmation form the Windows
registry...?

> Thanks, Elko.

Re:Windows registry...


Bedankt. Hier kan ik (als beginner) wel wat mee.
Ciao, Elko.

Quote
"M.H. Avegaart" <avegaartNOS...@mccomm.nl> wrote in message

news:9bmu19$d2k$1@porthos.nl.uu.net...
Quote
> Use the Registry unit, e.g.

> uses
>   Registry;

> function GetFirstInstallDateTime: TDateTime;
> var
>   R: TRegistry;
> begin
>   R := TRegistry.Create;
>   try
>     R.RootKey := HKEY_LOCAL_MACHINE;
>     if R.OpenKeyReadOnly('Software\Microsoft\Windows\CurrentVersion') then
>       R.ReadBinaryData('FirstInstallDateTime', Result, SizeOf(Result))
>     else
>       Result := 0.0;
>   finally
>     R.Free;
>   end;
> end;

> "Elko" <e.vandenbus...@business-review.com> schreef in bericht
> news:9bmse8$n0o$1@news1.xs4all.nl...
> > Can someone tell my how to obtain inforrmation form the Windows
> registry...?

> > Thanks, Elko.

Other Threads