ecfisa, he probado el código pero no va, lo único que he cambiado son las constantes y que lo ejecuto en un boton, te pongo el código por si ves, que he cometido algún error.
Código Delphi
[-]procedure TForm1.SpeedButton4Click(Sender: TObject);
const
PATH_BACKUP = 'C:\TEBICA PROGRAMA\SEG BD\';
FILE_BACKUP = 'C:\TEBICA PROGRAMA\BD\TEBICA.FDB';
var
lpOperation, lpFile, lpParameters, lpDirectory: PChar;
Nombre: string;
begin
Nombre:= StringOfChar('0',4-Length(IntToStr(YearOf(Now))))+IntToStr(YearOf(Now)) +
StringOfChar('0',2-Length(IntToStr(MonthOf(Now))))+IntToStr(MonthOf(Now)) +
StringOfChar('0',2-Length(IntToStr(DayOf(Now))))+IntToStr(DayOf(Now))+ '.FBK';
if not FileExists(Edit4.Text + Edit5.Text) then
with TPanel.Create(nil) do
try
Caption:= 'Realizando copia de seguridad, aguarde un momento por favor...';
Font.Size:= 14;
Font.Name:= 'Arial';
Width:= 600;
Height:= 70;
Left:= (Self.ClientWidth - Width) div 2;
Top:= (Self.ClientHeight - Height) div 2;
BevelInner:= bvNone;
BevelOuter:= bvNone;
BevelWidth:= 1;
BorderStyle:= bsSingle;
Ctl3D:= False;
Parent:= Self;
lpOperation:= 'open';
lpFile:= 'gbak.exe';
lpParameters:= PChar('-v -t -user SYSDBA -password "masterkey" '+ FILE_BACKUP + PATH_BACKUP + Nombre);
lpDirectory:= PChar(GetEnvironmentVariable('ProgramFiles')+'\Firebird\Firebird_2_5\bin');
ShellExecute(Handle, lpOperation, lpFile, lpParameters, lpDirectory, SW_HIDE);
finally
Free;
end;
end;
Mi firebirrd es 2_5 y esta activo (Run) como un servicio y el (Start) en automático,por si te sirve de ayuda.