Unable to run .exe file

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”: }

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

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.