# Windows pipeline capture

**URL:** <https://discourse.julialang.org/t/windows-pipeline-capture/102560>\
**Category:** General Usage\
**Tags:** question\
**Created:** [August 7, 2023, 12:38pm UTC](https://discourse.julialang.org/t/windows-pipeline-capture/102560 "2023-08-07T12:38:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![monty](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/monty/32/44234_2.png) [@monty](https://discourse.julialang.org/u/monty)\
**Post date:** [August 7, 2023, 12:38pm UTC](https://discourse.julialang.org/t/windows-pipeline-capture/102560/1 "2023-08-07T12:38:11Z")

</div>

I am trying to capture stdout/stderr of a windows command. However, it does not seem to work:

```julia
run(pipeline(`cmd /C nonexisting.exe`; stderr=devnull, stdout=devnull))

```

Produces:

```julia
Stacktrace:
 [1] pipeline_error
   @ .\process.jl:565 [inlined]
 [2] run(::Base.CmdRedirect; wait::Bool)
   @ Base .\process.jl:480
 [3] run(::Base.CmdRedirect)
   @ Base .\process.jl:477
 [4] top-level scope
   @ REPL[18]:1

```

---

<div class="post-metadata">

**Author:** ![frylock](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/frylock/32/50213_2.png) [@frylock](https://discourse.julialang.org/u/frylock)\
**Post date:** [August 7, 2023, 4:46pm UTC](https://discourse.julialang.org/t/windows-pipeline-capture/102560/2 "2023-08-07T16:46:27Z")

</div>

I don’t have a Windows system to try this out on, but what do you get when you run the example from [the documentation](https://docs.julialang.org/en/v1/manual/running-external-programs/)? (note: link not provided because I thought you didn’t read it, just provided to save someone some typing if they wanted a link to it)

```julia
readchomp(`cmd /C echo hello`)

```

---

<div class="post-metadata">

**Author:** ![monty](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/monty/32/44234_2.png) [@monty](https://discourse.julialang.org/u/monty)\
**Post date:** [August 7, 2023, 5:11pm UTC](https://discourse.julialang.org/t/windows-pipeline-capture/102560/3 "2023-08-07T17:11:24Z")

</div>

The problem was caused by `wait=true`. When `false` works as expected.
