Ver Mensaje Individual
  #3  
Antiguo 31-05-2016
Avatar de ecfisa
ecfisa ecfisa is offline
Moderador
 
Registrado: dic 2005
Ubicación: Tres Arroyos, Argentina
Posts: 10.508
Reputación: 36
ecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to behold
Hola.

En Delphi 7 el Library Path se almacena en el registro de Windows, en la clave HKEY_CURRENT_USER\Software\Borland\Delphi\7.0\Library.

Entonces para leer y/o agregar rutas, bastan dos funciones:
Código Delphi [-]
...
uses Registry;

function ReadSearchPath: string;
var
  rg: TRegistry;
begin
  rg := TRegistry.Create;
  try
    rg.RootKey := HKEY_CURRENT_USER;
    if rg.OpenKey('\Software\Borland\Delphi\7.0\Library', False)  then
    begin
      Result := rg.ReadString('Search Path');
      rg.CloseKey;
    end;
  finally
    rg.Free;
  end;
end;

procedure SaveSearchPath(const Path: string);
var
  rg: TRegistry;
begin
  rg := TRegistry.Create;
  try
    rg.RootKey := HKEY_CURRENT_USER;
    if rg.OpenKey('\Software\Borland\Delphi\7.0\Library', False)  then
    begin
      rg.WriteString('Search Path', Path);
      rg.CloseKey;
    end;
  finally
    rg.Free;
  end;
end;
Seguramente la clave debe cambiar bastante en XE8..., pero sería cosa de hurgar un poco en el registro para ver donde almacena esa información y probar...

Saludos
__________________
Daniel Didriksen

Guía de estilo - Uso de las etiquetas - La otra guía de estilo ....

Última edición por ecfisa fecha: 31-05-2016 a las 21:49:28.
Responder Con Cita