# Ansible  win\_package  product\_id  value not available while installing ruby

**URL:** <https://forum.ansible.com/t/ansible-win-package-product-id-value-not-available-while-installing-ruby/23198>\
**Category:** Ansible Project\
**Created:** [December 8, 2016, 7:23am UTC](https://forum.ansible.com/t/ansible-win-package-product-id-value-not-available-while-installing-ruby/23198 "2016-12-08T07:23:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Biswajit\_Pain](https://avatars.discourse-cdn.com/v4/letter/b/ce73a5/32.png) [@Biswajit\_Pain](https://forum.ansible.com/u/Biswajit_Pain)\
**Post date:** [December 8, 2016, 7:23am UTC](https://forum.ansible.com/t/ansible-win-package-product-id-value-not-available-while-installing-ruby/23198/1 "2016-12-08T07:23:43Z")

</div>

I am trying to install Ruby 2.2.5 exe package in Win2k12 server using ansible. As there is no registry value in HKLM\ .

Task Defination

- name: Install ruby  
win\_package:  
name: “Ruby 2.2.5-p319-x64”  
path: ‘{{ sharedpath }}rubyinstaller-2.2.5-x64.exe’  
product\_id: “”  
user\_name: “{{ username }}”  
user\_password: “{{ password }}”  
state: present  
Arguments: ‘/silent /tasks=“addtk,assocfiles,modpath”’  
ignore\_errors: True

Result

TASK [Install ruby] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
fatal: [10.107.45.24]: FAILED! =\> {“changed”: false, “failed”: true, “msg”: “Package from \\builder.dev.appvol.eng.abcd.com\Artifacts\toolchain\build\_machine\rubyinstaller-2.2.5-x64.exe was installed, but the specified ProductId and/or Name does not match package details”, “name”: “Ruby 2.2.5-p319-x64”}  
…ignoring

Is it possible to pass null value in product\_id

---

<div class="post-metadata">

**Author:** ![Trond\_Hindenes](https://avatars.discourse-cdn.com/v4/letter/t/96bed5/32.png) [@Trond\_Hindenes](https://forum.ansible.com/u/Trond_Hindenes)\
**Post date:** [December 9, 2016, 5:33pm UTC](https://forum.ansible.com/t/ansible-win-package-product-id-value-not-available-while-installing-ruby/23198/2 "2016-12-09T17:33:56Z")

</div>

If it doesn’t write to HKEY\_LOCAL\_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\ or HKEY\_LOCAL\_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ then you won’t be able to use win\_package to install it.

---

<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:** [December 9, 2016, 6:46pm UTC](https://forum.ansible.com/t/ansible-win-package-product-id-value-not-available-while-installing-ruby/23198/3 "2016-12-09T18:46:23Z")

</div>

You can probably workaround by using win\_command or raw to run msiexec.

Unfortunately there are a few .msi installers around which don't write a product id. Might be worth raising a bug on the rubyinstaller site, as its really a poorly made installer that is causing the problem here.

Jon
