# win\_package with no path in 2.3.2

**URL:** <https://forum.ansible.com/t/win-package-with-no-path-in-2-3-2/25445>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [September 9, 2017, 9:34pm UTC](https://forum.ansible.com/t/win-package-with-no-path-in-2-3-2/25445 "2017-09-09T21:34:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jim\_Heald](https://avatars.discourse-cdn.com/v4/letter/j/c4cdca/32.png) [@Jim\_Heald](https://forum.ansible.com/u/Jim_Heald)\
**Post date:** [September 9, 2017, 9:34pm UTC](https://forum.ansible.com/t/win-package-with-no-path-in-2-3-2/25445/1 "2017-09-09T21:34:17Z")

</div>

I’m currently using Ansible 2.3.2, and I want to uninstall a program from a group of computers. According to the UninstallString from the registry, it just uses msiexec /x with a certain product ID. Therefore, I’d think it should be very trivial to uninstall using win\_package.

However, my problem is that the program that was installed didn’t come with an MSI and I can’t find any MSIs for it within the filesystem. I did, however, confirm that msiexec can uninstall the program with the ProductID.

Since it requires a path, I was hoping that using an arbitrary path (in this case to a binary that would do nothing when called) it might work, but it doesn’t seem to do the trick. Here’s what I tried:

`

win\_package:  
path: ‘C:\Windows\System32\rundll32.exe’  
product\_id: ‘{7D7C80AF-58D6-4C3F-912B-8B5B4D50A71B}’  
state: absent

`

However, that didn’t seem to do the trick. What would be my best bet here?

---

<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:** [September 10, 2017, 6:20am UTC](https://forum.ansible.com/t/win-package-with-no-path-in-2-3-2/25445/2 "2017-09-10T06:20:28Z")

</div>

Hi

The win\_package module was overhauled in 2.4 and it now allows you to uninstall a package when you just specify the product id. In the end you should be able to run just

> - win\_package:  
> product\_id: ‘{7D7C80AF-58D6-4C3F-912B-8B5B4D50A71B}’  
> state: absent

This works the way you describe, when you don’t specify a path it tries to find the UninstallString in that key. If it exists it should just run msiexec.exe /x {7D7C80AF-58D6-4C3F-912B-8B5B4D50A71B} /qn /norestart. You can always add the newer version of the module but putting it in your ANSIBLE\_LIBRARY path. The URL for the newest version is [https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/windows/win\_package.ps1](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/windows/win_package.ps1), otherwise you can just check out the latest devel version and try it from there.

Thanks

Jordan
