# win\_package how can it know package has been installed when product\_id is not specified

**URL:** <https://forum.ansible.com/t/win-package-how-can-it-know-package-has-been-installed-when-product-id-is-not-specified/37493>\
**Category:** Ansible Project\
**Created:** [December 23, 2022, 2:24am UTC](https://forum.ansible.com/t/win-package-how-can-it-know-package-has-been-installed-when-product-id-is-not-specified/37493 "2022-12-23T02:24:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_Lu](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@Alex\_Lu](https://forum.ansible.com/u/Alex_Lu)\
**Post date:** [December 23, 2022, 2:24am UTC](https://forum.ansible.com/t/win-package-how-can-it-know-package-has-been-installed-when-product-id-is-not-specified/37493/1 "2022-12-23T02:24:04Z")

</div>

Hi everyone,

About win\_package, in the official document, it mentions: product\_id value is ignored if path is set to a local accesible file path and the package is not an exe.

So, if I want to install MSI package, and I specify the path to a local accessible file path, then I don’t need to set product\_id, correct ? If I don’t set product\_id, how it can know if the package has been installed? by searching for the InstallSource in registry?

---

<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:** [December 23, 2022, 3:56am UTC](https://forum.ansible.com/t/win-package-how-can-it-know-package-has-been-installed-when-product-id-is-not-specified/37493/2 "2022-12-23T03:56:57Z")

</div>

If it’s an msi, the module can scan the package itself to get the product\_id. If it’s an exe then it would need the product\_id or one of the creates\_\* options to try and add some idempotency.
