1. Using Command Prompt
To fetch the product key using the command prompt, you may open cmd as admin and run the following command:
wmic path softwarelicensingservice get OA3xOriginalProductKey
Remember that this command can fetch the product key only if you are using an OEM machine which came pre-installed with Windows and the key was injected in the Motherboard of the machine.
2. Using PowerShell
To fetch the product key using the PowerShell, you may open PowerShell as admin and run the following command:
powershell "(Get-WmiObject -query ‘select * from SoftwareLicensingService’).OA3xOriginalProductKey"Remember that this command can fetch the product key only if you are using an OEM machine which came pre-installed with Windows and the key was injected in the Motherboard of the machine.
3. Using VB Script
To fetch the product key using the VB Script, you may copy and paste the following code in a notepad file and save it as keyfinder.vbs and then run the file. It would show the product key in a small pop-up:
Set WshShell = CreateObject("WScript.Shell")
MsgBox ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId"))
Function ConvertToKey(Key)
Const KeyOffset = 52
i = 28
Chars = "BCDFGHJKMPQRTVWXY2346789"
Do
Cur = 0
x = 14
Do
Cur = Cur * 256
Cur = Key(x + KeyOffset) + Cur
Key(x + KeyOffset) = (Cur \ 24) And 255
Cur = Cur Mod 24
x = x -1
Loop While x >= 0
i = i -1
KeyOutput = Mid(Chars, Cur + 1, 1) & KeyOutput
If (((29 - i) Mod 6) = 0) And (i <> -1) Then
i = i -1
KeyOutput = "-" & KeyOutput
End If
Loop While i >= 0
ConvertToKey = KeyOutput
End Function
This command can fetch product key from OEM and non OEM PCs both.
4. Using the ProduKey tool
If none of the above methods work, you may use the NirSoft ProduKey tool to fetch the product key of your Windows. This tool can fetch the keys of Windows and MS Office also. Just download the tool from this link and run it as admin in your PC and it would show the product keys installed in your machine.
Set WshShell = CreateObject("WScript.Shell")
MsgBox ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId"))
Function ConvertToKey(Key)
Const KeyOffset = 52
i = 28
Chars = "BCDFGHJKMPQRTVWXY2346789"
Do
Cur = 0
x = 14
Do
Cur = Cur * 256
Cur = Key(x + KeyOffset) + Cur
Key(x + KeyOffset) = (Cur \ 24) And 255
Cur = Cur Mod 24
x = x -1
Loop While x >= 0
i = i -1
KeyOutput = Mid(Chars, Cur + 1, 1) & KeyOutput
If (((29 - i) Mod 6) = 0) And (i <> -1) Then
i = i -1
KeyOutput = "-" & KeyOutput
End If
Loop While i >= 0
ConvertToKey = KeyOutput
End Function
This command can fetch product key from OEM and non OEM PCs both.
4. Using the ProduKey tool
If none of the above methods work, you may use the NirSoft ProduKey tool to fetch the product key of your Windows. This tool can fetch the keys of Windows and MS Office also. Just download the tool from this link and run it as admin in your PC and it would show the product keys installed in your machine.
0 blogger:
Post a Comment