# Ansible win\_command

**URL:** <https://forum.ansible.com/t/ansible-win-command/30664>\
**Category:** Ansible Developer\
**Created:** [June 27, 2019, 4:32am UTC](https://forum.ansible.com/t/ansible-win-command/30664 "2019-06-27T04:32:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sindhu\_shree](https://avatars.discourse-cdn.com/v4/letter/s/b5e925/32.png) [@sindhu\_shree](https://forum.ansible.com/u/sindhu_shree)\
**Post date:** [June 27, 2019, 4:32am UTC](https://forum.ansible.com/t/ansible-win-command/30664/1 "2019-06-27T04:32:44Z")

</div>

Hi All,  
I need help in executing batch file which has some prompts.  
Am using following lines of script

- name: run an executable with custom working dir  
win\_command: pisrvstop.bat /argument1 “/argument 2 with space”  
args:  
chdir: F:\Program Files\PI\adm  
async: 120  
poll: 5

it works fine but it will not answer for the prompts. How do i set the answers for prompt?
