procedure (otherpath:string);
begin
CopyFile(pchar(Application.exename),pchar(otherpath+ExtractFileName(Application.exename)) ,false);
end;
注意:otherpath最后,要有'\'.
begin
CopyFile(pchar(Application.exename),pchar(otherpath+ExtractFileName(Application.exename)) ,false);
end;
注意:otherpath最后,要有'\'.
begin
CopyFile(pchar(Application.exename),pchar(FilePath) ,false);
end;File为你想要拷贝到的目录+文件名,如"c:\windows\system\myapp.exe"