# win\_msi not installig the msi package

**URL:** <https://forum.ansible.com/t/win-msi-not-installig-the-msi-package/22124>\
**Category:** Ansible Project\
**Created:** [July 26, 2016, 2:09pm UTC](https://forum.ansible.com/t/win-msi-not-installig-the-msi-package/22124 "2016-07-26T14:09:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![megha\_sharma](https://avatars.discourse-cdn.com/v4/letter/m/48db29/32.png) [@megha\_sharma](https://forum.ansible.com/u/megha_sharma)\
**Post date:** [July 26, 2016, 2:09pm UTC](https://forum.ansible.com/t/win-msi-not-installig-the-msi-package/22124/1 "2016-07-26T14:09:34Z")

</div>

Hi,

I am using Ansible 2.1.0.0 and trying to run the below playbook

- name: Install 7 zip  
win\_msi:  
extra\_args: “/quiet”  
path: ‘C:\path\7z1602-x64.msi’  
state: present

Output:

TASK [Install 7 zip] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
changed: [10.155.208.130]

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
10.155.208.130 : ok=3 changed=1 unreachable=0 failed=0

But installation of the 7 zip is not happening.  
Please help.

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [July 27, 2016, 5:15am UTC](https://forum.ansible.com/t/win-msi-not-installig-the-msi-package/22124/2 "2016-07-27T05:15:09Z")

</div>

I recommend using win\_package instead of win\_msi

If you still want to use win\_msi I recommend setting wait: true as this seems to make it run more reliably on Server 2008 R2 / Powershell 3.0. However I haven’t seen your case where it appears to fail silently. I assume you have previously downloaded the 7z1602-x64.msi to c:\Path folder?

- name: Install 7 zip  
win\_msi:  
extra\_args: “/quiet”  
path: ‘C:\path\7z1602-x64.msi’  
state: present  
wait: true

Might be worth running your playbook with -v to see if there is any log output produced.

One other thing to check is that your windows host is 64-bit - if it isn’t you’ll need the x86.msi instead of the x64.msi file

Hope this helps,

Jon

---

<div class="post-metadata">

**Author:** ![megha\_sharma](https://avatars.discourse-cdn.com/v4/letter/m/48db29/32.png) [@megha\_sharma](https://forum.ansible.com/u/megha_sharma)\
**Post date:** [July 28, 2016, 6:36am UTC](https://forum.ansible.com/t/win-msi-not-installig-the-msi-package/22124/3 "2016-07-28T06:36:53Z")

</div>

Hi,

In order to use win\_package I need Product Id of the respective msi/exe.I can get the product Id of an already installed msi/exe but what if it is a new package to be installed, how will i get the product Id of a new package.

Thanks,  
Megha

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [July 29, 2016, 4:20pm UTC](https://forum.ansible.com/t/win-msi-not-installig-the-msi-package/22124/4 "2016-07-29T16:20:59Z")

</div>

You can do a manual installation and then look in the registry in `HKLM:Software\Microsoft\Windows\CurrentVersion\Uninstall` or for 32 bit programs`HKLM:Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall`

Or you can just a fake product id, install it and then find the product id and fix your playbook to have the correct product id

Jon
