# use Ansible to install a .exe program on windows machine

**URL:** <https://forum.ansible.com/t/use-ansible-to-install-a-exe-program-on-windows-machine/28431>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [August 27, 2018, 8:52pm UTC](https://forum.ansible.com/t/use-ansible-to-install-a-exe-program-on-windows-machine/28431 "2018-08-27T20:52:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nguyen\_Hoang](https://avatars.discourse-cdn.com/v4/letter/n/ecd19e/32.png) [@Nguyen\_Hoang](https://forum.ansible.com/u/Nguyen_Hoang)\
**Post date:** [August 27, 2018, 8:52pm UTC](https://forum.ansible.com/t/use-ansible-to-install-a-exe-program-on-windows-machine/28431/1 "2018-08-27T20:52:46Z")

</div>

Hi All,

I am new to Ansible and I want to use Ansible to install a .exe program on windows machines.

I have a Ansible server on a CentOs linux machine and 10 windows 2012 R2 machines where I want to install a .exe program on each windows machine.

If I want to use win\_chocolatey, Can you tell me if I have to install chocolatey package on every windows machine ?

Can you tell me if I must do something on Linux Centos Ansible server to run playbook with win\_chocolatey ?

Thanks in advance,

Viet Minh

---

<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:** [August 27, 2018, 9:30pm UTC](https://forum.ansible.com/t/use-ansible-to-install-a-exe-program-on-windows-machine/28431/2 "2018-08-27T21:30:35Z")

</div>

> If I want to use win\_chocolatey, Can you tell me if I have to install chocolatey package on every windows machine ?

win\_chocolatey will ensure Chocolatey is installed if it isn’t present. This requires an active internet connection by default but in the upcoming 2.7 release you can set an offline source to install it. Same thing with the packages it automatically sources from the public repo on the internet but you can specify an offline internal source accessible within your organisation if that is what you want to do.

> Can you tell me if I must do something on Linux Centos Ansible server to run playbook with win\_chocolatey ?

Ensure that Ansible can connect to your Windows host and that’s it. The win\_chocolatey module is run on the Windows host only, Ansible does all the abstraction to execute it and return the results back.

While I do highly recommend you use win\_chocolatey for all this as it makes things so much simpler you are not limited to using it. You can use win\_package or even just win\_command to install an executable manually, the trouble with this approach is you need to know what the silent install arguments are when invoking the executable. Chocolatey does all this for you and makes it quite simple to uninstall and upgrade packages in the future.

Thanks

Jordan

---

<div class="post-metadata">

**Author:** ![Shivaji\_Patne](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@Shivaji\_Patne](https://forum.ansible.com/u/Shivaji_Patne)\
**Post date:** [August 28, 2018, 5:38am UTC](https://forum.ansible.com/t/use-ansible-to-install-a-exe-program-on-windows-machine/28431/3 "2018-08-28T05:38:29Z")

</div>

hi,

can you briefly explain how you configure of ansible+ windows .

i did windows host machine installed virtual box and at windows client side i configured winrm, powershell3.0 .

i am facing the ssl certificate error .

help me to any easy waY to solve this process.

regards  
shivaji

---

<div class="post-metadata">

**Author:** ![Nguyen\_Hoang](https://avatars.discourse-cdn.com/v4/letter/n/ecd19e/32.png) [@Nguyen\_Hoang](https://forum.ansible.com/u/Nguyen_Hoang)\
**Post date:** [August 28, 2018, 9:24am UTC](https://forum.ansible.com/t/use-ansible-to-install-a-exe-program-on-windows-machine/28431/4 "2018-08-28T09:24:20Z")

</div>

Hi Jordan,

Thanks a lot for your help

Regards

Viet Minh
