Tema: Registry
Ver Mensaje Individual
  #1  
Antiguo 19-02-2007
Avatar de acertij022
acertij022 acertij022 is offline
Miembro
 
Registrado: may 2003
Ubicación: Argentina-Bs. As.
Posts: 233
Reputación: 22
acertij022 Va por buen camino
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?
Responder Con Cita