Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

win_product_facts: fix an issue that the module doesn't correctly convert a product id #251

Merged
merged 2 commits into from
Jun 19, 2021

Conversation

sky-joker
Copy link
Contributor

@sky-joker sky-joker commented May 15, 2021

SUMMARY

The win_product_facts module has an issue that doesn't convert to the correct id from the registered product id in Windows10.(maybe a bug)
This PR will fix the issue.

fixes: #247

I made the patch while referencing the following vbs(productkey.vbs).

https://answers.microsoft.com/en-us/windows/forum/windows_other-windows_install/get-preinstalled-product-key/e39ec36f-ec3b-4495-b049-be02527a21ce
https://answers.microsoft.com/en-us/windows/forum/windows_10-windows_install-winpc/windows-10-activation-error-0x8007007b/45d12b1c-30b1-4001-bc10-0bcd3da7db1f

By the way, the product id correctly gets with the productkey.vbs.

COMPONENT NAME

plugins/modules/win_product_facts.ps1

ADDITIONAL INFORMATION

Tested on Windows 10.

@sky-joker sky-joker changed the title [WIP] win_product_facts: fix an issue that the module doesn't correctly convert a product id win_product_facts: fix an issue that the module doesn't correctly convert a product id May 15, 2021
@sky-joker
Copy link
Contributor Author

Unfortunately, I confirmed the module with the patch doesn’t correctly convert to a string in a part of MAK.
By the way, I also confirmed the existing module doesn’t also correctly convert even with the same MAK.

@jborean93
Copy link
Collaborator

Thanks for fixing this, I've verified this with some eval ISOs and the last digits now match what Windows reports in it's settings.

@jborean93 jborean93 merged commit 54b5f3b into ansible-collections:main Jun 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

win_product_facts: The module doesn't return correctly the product id
2 participants