Delphi 最简单的升级下载代码


本文整理自网络,侵删。

 
user idhttp;
var
  Stream: TMemoryStream;
begin
  try
    try
      Stream := TMemoryStream.Create;
      IdHTTP1.Get('http://dww.no-ip.org/simplex/spw.exe', Stream);
      a := IdHTTP1.Response.ContentLength;
      RenameFile('spw.exe', 'spw.old');
      Stream.SaveToFile('spw.exe');
    finally
      Stream.Free;
      IdHTTP1.Disconnect;
    end;
  except
    RenameFile('spw.old', 'spw.exe');
  end;

相关阅读 >>

Delphi 窗体的位置和高宽度-tform:letf、top、width、height、clientwidth、clientheight

Delphi中datetimepicker控件同时输入日期和时间

Delphi xe6开发的android应用实现在线升级完成后自动安装apk代码

Delphi rest/post

如何在Delphi xe中通过ftp下载文件

Delphi 用ado从文本文件中导入数据库的两种方法比较

Delphi如何计算一个文件目录的大小

Delphi xe5开发的android手机截屏功能

Delphi 中的字符串

Delphi中补齐字符串长度

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...