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

Incorrect installed key #1

Open
blackwatercitadel opened this issue Sep 3, 2018 · 1 comment
Open

Incorrect installed key #1

blackwatercitadel opened this issue Sep 3, 2018 · 1 comment

Comments

@blackwatercitadel
Copy link

When I run the script it is showing the Installed Key as BBBBB-BBBBB-BBBBB-BBBBB-BBBBB. But if I run the following commands I get the correct key.

From CMD:
wmic path softwarelicensingservice get OA3xOriginalProductKey

From PowerShell:
powershell "(Get-WmiObject -query ‘select * from SoftwareLicensingService’).OA3xOriginalProductKey"

@dionindahub
Copy link

I had this issue when I tried to get the Product Keys from Enterprise editions of Win7 and Win10.
It turned out it's not a problem of the script, it's the value of HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId that, when decoded, returns BBBBB-BBBBB-BBBBB-BBBBB-BBBBB, and I think that happens because it's a bulk license.
Note that I got the same results (all Bs) by running AIDA64 on the same machine.

What this VBScript does is it decodes the registry key mentioned above to return the currently used product key.

The wmic query you mention returns the Original Product Key, i.e. the product key put by the OEM when the machine was shipped. This might be the key currently in use, but it's the case necessarily.

For example, your organisation bought some laptops in a lucrative price but they came with Windows 10 Home pre-installed.
Then you installed Windows 10 Pro so that they can connect to your org's AD.
If you query wmic you'll get the Win 10 Home key, while if you run the VBScript you'll get the Win 10 Pro key. And if, instead of Win 10 Pro keys, you used your org's bulk licensed Win 10 Enterprise key, you'll get all Bs from the VBScript.

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

No branches or pull requests

2 participants