win_package how can it know package has been installed when product_id is not specified

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?

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.