Unable to run .exe file

22 views
Skip to first unread message

Karthik Chandrashekar

unread,
Sep 28, 2018, 3:13:25 AM9/28/18
to ansible...@googlegroups.com
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": []}

Jordan Borean

unread,
Sep 28, 2018, 7:16:16 AM9/28/18
to Ansible Project
This sounds like the error you would get when using win_shell, please give us some yaml task examples you have tried.

Karthik Chandrashekar

unread,
Sep 28, 2018, 12:44:55 PM9/28/18
to Ansible Project
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. 
Reply all
Reply to author
Forward
0 new messages