# Unable to run .exe file

**URL:** <https://forum.ansible.com/t/unable-to-run-exe-file/28673>\
**Category:** Ansible Project\
**Created:** [September 28, 2018, 7:13am UTC](https://forum.ansible.com/t/unable-to-run-exe-file/28673 "2018-09-28T07:13:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Karthik\_Chandrasheka](https://avatars.discourse-cdn.com/v4/letter/k/9d8465/32.png) [@Karthik\_Chandrasheka](https://forum.ansible.com/u/Karthik_Chandrasheka)\
**Post date:** [September 28, 2018, 7:13am UTC](https://forum.ansible.com/t/unable-to-run-exe-file/28673/1 "2018-09-28T07:13:05Z")

</div>

Hi everyone,

Need help in understanding below error message and how to fix it.

I am trying to run a .exe file using ansible tried ( raw, win\_shell and win\_command ) but, all end up throwing same error.

FAILED! =\> {“changed”: true, “msg”: “non-zero return code”, “rc”: 1, “stderr”: “C:/SystemManager/MASysMgr.exe : The term ‘C:/SystemManager/MASysMgr.exe’ is \r\nnot recognized as the name of a cmdlet, function, script file, or operable \r\nprogram. Check the spelling of the name, or if a path was included, verify \r\nthat the path is correct and try again.\r\nAt line:1 char:1\r\n+ C:/SystemManager/MASysMgr.exe -w \r\nC:\SystemManager\Migration\Workflow\Package\_Cre …\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n+ CategoryInfo : ObjectNotFound: (C:/SystemManager/MASysMgr.exe:S \r\ntring) , CommandNotFoundException\r\n+ FullyQualifiedErrorId : CommandNotFoundException\r\n”, “stderr\_lines”: ["C:/SystemManager/MASysMgr.exe : The term ‘C:/SystemManager/MASysMgr.exe’ is ", "not recognized as the name of a cmdlet, function, script file, or operable ", "program. Check the spelling of the name, or if a path was included, verify ", “that the path is correct and try again.”, “At line:1 char:1”, "+ C:/SystemManager/MASysMgr.exe -w ", “C:\SystemManager\Migration\Workflow\Package\_Cre …”, “+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~”, "+ CategoryInfo : ObjectNotFound: (C:/SystemManager/MASysMgr.exe:S ", “tring) , CommandNotFoundException”, “+ FullyQualifiedErrorId : CommandNotFoundException”], “stdout”: “”, “stdout\_lines”: }

---

<div class="post-metadata">

**Author:** ![jborean](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jborean/32/1525_2.png) [@jborean](https://forum.ansible.com/u/jborean)\
**Post date:** [September 28, 2018, 11:16am UTC](https://forum.ansible.com/t/unable-to-run-exe-file/28673/2 "2018-09-28T11:16:16Z")

</div>

This sounds like the error you would get when using win\_shell, please give us some yaml task examples you have tried.

---

<div class="post-metadata">

**Author:** ![Karthik\_Chandrasheka](https://avatars.discourse-cdn.com/v4/letter/k/9d8465/32.png) [@Karthik\_Chandrasheka](https://forum.ansible.com/u/Karthik_Chandrasheka)\
**Post date:** [September 28, 2018, 4:44pm UTC](https://forum.ansible.com/t/unable-to-run-exe-file/28673/3 "2018-09-28T16:44:54Z")

</div>

Hi jordan,

Below is one of the sample task which works.

SUCCESS:  
win\_file:

path: C:\SystemManager\Supported\_Files/{{ date }}\_{{ name }}  
state: directory

FAILURE:  
raw: C:\SystemManager\MASysMgr.exe -w C:\SystemManager\Migration\Workflow\Package\_Creation\_Workflow.smw -f C:\SystemManager\Supported\_Files/{{ date }}\_{{ name }}/{{ migrationnum }}_Input\_Parameters.smp -l C:\SystemManager\Migration\Log\SysMgrMigration_{{ date }}.log

I have tried using it with quotes,escape characters,win\_shell,win\_command but, all of them end up with same error.
