delphi 的可执行文件(EXE)可以这样更新后重启
var StrExePath,strEXE:string; begin StrExePath:=ExtractFilePath(Application.ExeName); strEXE:='Project1.exe'; showmessage('down is over') ; close; if RenameFile(StrExePath+StrExe,'123.exe') then ShellExecute(Handle,'',PChar('123.exe'),'','',SW_NORMAL); end;