Ver Mensaje Individual
  #5  
Antiguo 13-05-2015
tulio tulio is offline
Miembro
 
Registrado: may 2003
Ubicación: Argentina
Posts: 309
Reputación: 24
tulio Va por buen camino
Hola Ecfisa

te cuento que copie el ejemplo tal cual, me instale el 7Zip y no me funciona, no da error pero no hace nada despues de dar click en el boton que llama al procedimiento

te envio todo el codigo para ver si hice algo mal
Código Delphi [-]
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Buttons,ShellApi;

type
  TForm1 = class(TForm)
    BitBtn1: TBitBtn;
    procedure BitBtn1Click(Sender: TObject);
    procedure SpeedButton1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

procedure CompressBD(SourcePath, TargetPath: string);
var
  zName: string;
begin
  SourcePath := IncludeTrailingPathDelimiter( SourcePath );
  TargetPath := IncludeTrailingPathDelimiter( TargetPath );
  zName := IncludeTrailingPathDelimiter( TargetPath ) +
           FormatDateTime( 'ddmmyy', Date ) + '.ZIP'; // (1)
  ShellExecute( 0,
                'open',
                PChar( GetEnvironmentVariable('Archivos de programa') + '\7-Zip\7zfm.exe' ), //(2)
                PChar( Format( 'a -r %s %s*.GDB',[zName, SourcePath] ) ),
                nil,
                SW_SHOWNORMAL );
end;

{$R *.dfm}
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
CompressBD( 'c:\sistemas\cnaz\base_de_datos', 'c:\sistemas' );
end;


end.

saludos !!!!
Responder Con Cita