You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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"
The text was updated successfully, but these errors were encountered: