# not able to perform execute\_process()

**URL:** <https://discourse.cmake.org/t/not-able-to-perform-execute-process/7078>\
**Category:** Code\
**Tags:** os:windows\
**Created:** [December 15, 2022, 9:10am UTC](https://discourse.cmake.org/t/not-able-to-perform-execute-process/7078 "2022-12-15T09:10:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vryy](https://discourse.cmake.org/user_avatar/discourse.cmake.org/vryy/32/3008_2.png) [@vryy](https://discourse.cmake.org/u/vryy)\
**Post date:** [December 15, 2022, 9:10am UTC](https://discourse.cmake.org/t/not-able-to-perform-execute-process/7078/1 "2022-12-15T09:10:17Z")

</div>

I invoked execute\_process as below

```
execute_process(
  COMMAND
  ${POST_PROCESSOR} --filter=ensight --file=${PREFIX}
  WORKING_DIRECTORY ${TEST_DIR}
  COMMAND_ECHO STDOUT
 OUTPUT_VARIABLE log2
 ERROR_VARIABLE err2
 RESULT_VARIABLE status
)

```

execute\_process does nothing and exports nothing to log2 and err2 variable. However when I execute the command echoed out to the terminal everything works normally. What could be the reason why the command is not executed in this case?

---

<div class="post-metadata">

**Author:** ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)\
**Post date:** [December 15, 2022, 1:07pm UTC](https://discourse.cmake.org/t/not-able-to-perform-execute-process/7078/2 "2022-12-15T13:07:01Z")

</div>

Is it actually running what you expect? Is `status` showing that there’s an error state? You can use `cmake --trace-expand` to see what those variables expand to; perhaps they don’t match what you expect?
