Posted By

merijnw on 02/09/07


Tagged

redirect output ExeRun


Versions (?)

Execute external program and redirect output to file


 / Published in: W-Language
 

  1. TempFile is string = "executethis.bat"
  2. FID = fCreate(TempFile)
  3. IF FID = -1 THEN sErr = "Could not create a bat file."
  4. scommand is string = fexedir()+"\someprog.exe -param1 > someprog.out"
  5. IF NOT fWriteLine(FID, scommand) THEN sErr = "Could not write in bat file."
  6. fClose(FID)
  7. IF NOT ExeRun(TempFile ,exeIconize,exeWait) THEN sErr = "Could not executed the bat file."
  8. fDelete(TempFile)

Report this snippet  

You need to login to post a comment.