Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   API de Windows (https://www.clubdelphi.com/foros/forumdisplay.php?f=7)
-   -   Registry (https://www.clubdelphi.com/foros/showthread.php?t=40517)

acertij022 19-02-2007 23:13:27

Registry
 
Hola delphiano necesito comprobar dentro de la Regestry si existe una direccion para identifcar si tiene el framewok 2.0 instalado para eso realice lo siguiente sin tener suerte
Código Delphi [-]
unit Main;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, registry, Psock, NMHttp;

type
  TForm1 = class(TForm)
    Button1: TButton;
    NMHTTP: TNMHTTP;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin

with TRegistry.Create do
  try
    RootKey:= HKEY_CURRENT_USER; // <-- La clave root
    if OpenKey('SOFTWARE\Microsoft\Windows\.NETFramework\v2.0',FALSE) then
    begin
      ShowMessage('existe');
      CloseKey;
    end;
  finally
    Free;
  end;
end;

end.
¿QUE ES LO QUE HICE MAL? :confused:

egostar 19-02-2007 23:26:14

Checa este Link ahi viene como hacer lo que requieres.

Saludos.

acertij022 20-02-2007 00:24:18

gracias es lo que necesito :p


La franja horaria es GMT +2. Ahora son las 12:55:00.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi