T
takdick
Unregistered / Unconfirmed
GUEST, unregistred user!
我用assignfile創建了一*.bat文件,是要ftp到何服器上去下載文件,有多條操作命令.<br>執行winexec('c:/test.bat',sw_normal);後只見dos窗口閃了一下,卻不見test.bat執行後的我要的結果,但自己雙擊test.bat卻是正常執行.請問何解?源碼如下.<br>procedure TForm1.Button1Click(Sender: TObject);<br>var<br>f:textfile;<br>begin<br>assignfile(f,'c:/test.bat');<br>rewrite(f);<br>writeln(f,'ftp -s:info.ftp ftp.server.com');<br>closefile(f);<br><br>assignfile(f,'c:/windows/info.ftp');<br>rewrite(f);<br>writeln(f,'username');<br>writeln(f,'mypass');<br>writeln(f,'ascii');<br>writeln(f,'get temp.exe c:/temp.exe');<br>writeln(f,'quit');<br>closefile(f);<br>winexec('c:/test.bat',sw_normal);<br>end;