自动程序更新方法一种

来源:互联网 发布:大数据理论研究 编辑:程序博客网 时间:2024/06/12 19:51

procedure Tftmainform.FormCreate(Sender: TObject);
begin
  Update_Exe();//更新程序
  Start_exe(); //启动程序
end;

procedure Tftmainform.Start_exe;
begin
  WinExec('Employee.exe', SW_SHOWMAXIMIZED);
  Application.Terminate;
end;

procedure Tftmainform.Update_Exe;
begin
 if fileage('//192.168.5.5/liveupdate/Update/Employee.exe')<>fileage('Employee.exe') then
  CopyFile('//192.168.5.5/liveupdate/Update/Employee.exe','Employee.exe',False);
end;

 

对于 报表设计窗口,可以在memo字段加入Sql语句,打印直接取这个sql的数据,这样更加通用!

原创粉丝点击