D:\Program Files\Common Files\Borland Shared\BDE这是指bde安装的路径。假如你的程序需要自己安装bde(也就是只拷贝几个必要的dll到客户端的话),可以使用一下代码在你的程序中动态安装bde(注意,bde文件要分发到你的程序的安装目录中)procedure InitBde;
var
   DataDirectory : string;
   ARegistry     : TRegistry;
begin
  DataDirectory := ExtractFilePath( Application.ExeName );
  DataDirectory := DataDirectory+'bde\';
  ARegistry     := TRegistry.Create;
  with ARegistry do    {创建一个TRegistry对象实例  }
  begin
    RootKey := HKEY_LOCAL_MACHINE;{指定根键为HKEY_LOCAL_MACHINE}
    if not OpenKey( 'Software\Borland\BLW32', False ) then
    begin
      OpenKey( 'Software\Borland\BLW32', True );
      WriteString( 'BLAPIPATH', DataDirectory );
    end;
    CloseKey;    {关闭主键,同时将信息写入注册表}
    RootKey := HKEY_LOCAL_MACHINE;
    if not OpenKey('Software\Borland\Database Engine',False) then
    begin
      OpenKey('Software\Borland\Database Engine',True);
      WriteString( 'DLLPATH', DataDirectory );
    end;
    CloseKey;    {关闭主键,同时将信息写入注册表}
    Destroy;     {释放内存  }
  end;
end;