# Run DOS Command action does not "complete" when "log output" is checked

**URL:** https://www.finalbuilder.com/forums/t/run-dos-command-action-does-not-complete-when-log-output-is-checked/1806
**Category:** Discussion
**Created:** [July 20, 2011, 12:40pm UTC](https://www.finalbuilder.com/forums/t/run-dos-command-action-does-not-complete-when-log-output-is-checked/1806 "2011-07-20T12:40:51Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ericpopivker](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/e/e68b1a/32.png) [@ericpopivker](https://www.finalbuilder.com/forums/u/ericpopivker)
#### Post date: [July 20, 2011, 12:40pm UTC](https://www.finalbuilder.com/forums/t/run-dos-command-action-does-not-complete-when-log-output-is-checked/1806/1 "2011-07-20T12:40:51Z")

</div>

I created a Dos Command action to execute a batch file and it works fine if I don't have "log output" option checked.

If I check "log output" the command keeps "running" forever. &nbsp;When I click on "Stop" button, I get message:

"Program returned code &nbsp;: 1001"

&nbsp;

From the log created by batch file - it seems like batch finishes executing, but FinalBuilder does not detect it somehow.

When I run Batch file directly in Dos CMD&nbsp;it works fine.

&nbsp;

I also tried "Execute Program" action, but same issue.

This is in FinalBuilder 7.0

Eric&nbsp;

&nbsp;

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [July 21, 2011, 5:30am UTC](https://www.finalbuilder.com/forums/t/run-dos-command-action-does-not-complete-when-log-output-is-checked/1806/2 "2011-07-21T05:30:15Z")

</div>

&nbsp;Hi,  
  
I encountered this problem a while ago, I guess it might has something to do with the pipe buffer deadlock.  
  
I resolved this with suppressing (actually, saving) the command line output to a file by adding "\>\> filename" such as:  
"dir /w \>\> logfile.txt"  
"olala.bat \>\> logfile.txt"  
&nbsp;

But this method won't show the log output (If I don't want it, I'd already unchecked log output),  
so I add a [run script] action and write a script to print the logfile line by line.  
&nbsp;

Hope this helps while they are checking for the problem.

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [July 21, 2011, 6:21am UTC](https://www.finalbuilder.com/forums/t/run-dos-command-action-does-not-complete-when-log-output-is-checked/1806/3 "2011-07-21T06:21:07Z")

</div>

Eric you haven’t really given us enough information to work with. What is the FinalBuilder build number, windows OS & version, and more importantly what does your batch file do? I would suggest you contact us via email support at finalbuild dot com with your batch file and finalbuilder project so that we can try to reproduce the problem here.
