Ver Mensaje Individual
  #1  
Antiguo 27-09-2006
sammyrano sammyrano is offline
Registrado
 
Registrado: abr 2006
Posts: 3
Reputación: 0
sammyrano Va por buen camino
Registro de windows remoto

Hola a todos.

Tengo una duda para lograr leer el registro de una máquina de manera remota. Hata el momento he checado la librería TRegistry, pero no he encontrado una manera de conseguir leer un equipo remoto. Principalmente lo que deseo realizar es obtener las claves de windows y uso la siguiente tarea:

Código:
Código Delphi [-]
function View_Win_Key: string;
begin
  Reg := TRegistry.Create;
  try
    Reg.RootKey := HKEY_LOCAL_MACHINE;
    if Reg.OpenKeyReadOnly('\SOFTWARE\Microsoft\Windows NT\CurrentVersion') then
    begin
      if Reg.GetDataType('DigitalProductId') = rdBinary then
      begin
        PN         := (Reg.ReadString('ProductName'));
        PID        := (Reg.ReadString('ProductID'));
        binarySize := Reg.GetDataSize('DigitalProductId');
        SetLength(HexBuf, binarySize);
        if binarySize > 0 then
        begin
          Reg.ReadBinaryData('DigitalProductId', HexBuf[0], binarySize);
        end;
      end;
    end;
  finally
    FreeAndNil(Reg);
  end;
  Result := '';
  Result := DecodeProductKey(HexBuf);
end;
Responder Con Cita