How to find the key of Windows 8

User Rating: 0 / 5

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive

command iconIn this article we will talk about how to find the key of Windows 8, with which the system is activated. Recall that in Windows 8, as in previous OS of Microsoft - the product key is a sequence of 25 characters, divided into 5 groups of 5 characters each (XXXXX-XXXXX-XXXXX-XXXXX-XXXXX). This key is used to activate all versions of Windows 8.

When you activate Windows 8 need to consider the following points:

Key Windows 8 can only be used to activate the same edition of Windows 8, for which it is intended, and not for any other (ie, using the key of Windows 8 Pro will not activate Windows 8 home).

OEM key can be used to activate the OEM-tion copy of Windows 8 on the same computer on which it was activated for the first time and in any other.

Retail key can activate Windows 8 on any computer, but only one at a time.

When buying a retail version of Windows 8 product key supplied in the form of stickers that can be pasted on the system unit or laptop, if you buy the device is preloaded with Windows 8, OEM-key has been glued to the body of device. This label is called Certificate of Authenticity (COA).


However, it often happens that a "tragic reason," the text on a label becomes unreadable license (spilled coffee on her knees wore out, just lost, etc.). In this case, you can programmatically find the key of Windows 8 so that you can later when reinstalling the system to reactivate it? Also you may need to check the system for license and match the key installed in the system and the key on the sticker.

Windows 8 activation key is stored in the registry, but not in the clear and encrypted (coding base 24). In principle it is possible to extract from there, decrypt and copy on paper. Key information stored in the registry key HKLM \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \ DigitalProductId, we only need to extract it and decipher.

DigitalProductId Windows_8

In general, the activated key can be retrieved through WMI. It can be done without the use of third-party programs facilities. Medical already available as part of Windows 8: VBScrit and Powershell. Below we present two methods which allow to determine the key of Windows 8.

Obtain an activation key Windows 8 with VBScript

Create a new text file named get_windows_8_key.vbs and save it on your desktop

Insert the following code

Set WshShell = CreateObject("WScript.Shell")

regKey = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\"

DigitalProductId = WshShell.RegRead(regKey & "DigitalProductId")

Win8ProductName = "Windows Product Name: " & WshShell.RegRead(regKey & "ProductName") & vbNewLine

Win8ProductID = "Windows Product ID: " & WshShell.RegRead(regKey & "ProductID") & vbNewLine

Win8ProductKey = ConvertToKey(DigitalProductId)

strProductKey ="Windows 8 Key: " & Win8ProductKey

Win8ProductID = Win8ProductName & Win8ProductID & strProductKey



Function ConvertToKey(regKey)

Const KeyOffset = 52

isWin8 = (regKey(66) \ 6) And 1

regKey(66) = (regKey(66) And &HF7) Or ((isWin8 And 2) * 4)

j = 24



Cur = 0

y = 14


Cur = Cur * 256

Cur = regKey(y + KeyOffset) + Cur

regKey(y + KeyOffset) = (Cur \ 24)

Cur = Cur Mod 24

y = y -1

Loop While y >= 0

j = j -1

winKeyOutput = Mid(Chars, Cur + 1, 1) & winKeyOutput

Last = Cur

Loop While j >= 0

If (isWin8 = 1) Then

keypart1 = Mid(winKeyOutput, 2, Last)

insert = "N"

winKeyOutput = Replace(winKeyOutput, keypart1, keypart1 & insert, 2, 1, 0)

If Last = 0 Then winKeyOutput = insert & winKeyOutput

End If

a = Mid(winKeyOutput, 1, 5)

b = Mid(winKeyOutput, 6, 5)

c = Mid(winKeyOutput, 11, 5)

d = Mid(winKeyOutput, 16, 5)

e = Mid(winKeyOutput, 21, 5)

ConvertToKey = a & "-" & b & "-" & c & "-" & d & "-" & e

End Function

Double-click on the file, you should see a window with the displayed product key in it. In our case, the system is activated key Windows 8 Release Preview.


Ready vbs script can be downloaded

How to find the activation key Windows 8 with Powershell

Learn key installed Windows 8 can also use the Powerhell.

  1. Create a file with the extension get_windows_8_key.ps1 and copy the following code:


function Get-WindowsKey {

## get the Windows Product Key from any PC

param ($targets = ".")

$hklm = 2147483650

$regPath = "Software\Microsoft\Windows NT\CurrentVersion"

$regValue = "DigitalProductId"

Foreach ($target in $targets) {

$productKey = $null

$win32os = $null

$wmi = [WMIClass]"\\$target\root\default:stdRegProv"

$data = $wmi.GetBinaryValue($hklm,$regPath,$regValue)

$binArray = ($data.uValue)[52..66]

$charsArray = "B","C","D","F","G","H","J","K","M","P","Q","R","T","V","W","X","Y","2","3","4","6","7","8","9"

## decrypt base24 encoded binary data

For ($i = 24; $i -ge 0; $i--) {

$k = 0

For ($j = 14; $j -ge 0; $j--) {

$k = $k * 256 -bxor $binArray[$j]

$binArray[$j] = [math]::truncate($k / 24)

$k = $k % 24


$productKey = $charsArray[$k] + $productKey

If (($i % 5 -eq 0) -and ($i -ne 0)) {

$productKey = "-" + $productKey



$win32os = Get-WmiObject Win32_OperatingSystem -computer $target

$obj = New-Object Object

$obj | Add-Member Noteproperty Computer -value $target

$obj | Add-Member Noteproperty Caption -value $win32os.Caption

$obj | Add-Member Noteproperty CSDVersion -value $win32os.CSDVersion

$obj | Add-Member Noteproperty OSArch -value $win32os.OSArchitecture

$obj | Add-Member Noteproperty BuildNumber -value $win32os.BuildNumber

$obj | Add-Member Noteproperty RegisteredTo -value $win32os.RegisteredUser

$obj | Add-Member Noteproperty ProductID -value $win32os.SerialNumber

$obj | Add-Member Noteproperty ProductKey -value $productkey

2. Start a command prompt with administrator privileges to open the console and follow it PoSh team powershell

3. In the window that appears to allow execution of unsigned scripts command: Set-ExecutionPolicy RemoteSigned

4. Run the command:

Import-Module d:\myfile.ps1;


The result is displayed in the window key set Powershell Windows


If you want the activation keys on remote computers, use the Get-WindowsKey «computer1″, «serv-dc2″, «romp-buh02″

Ready powershell script is

Procedures described above, provide insight into the key installed Windows, will work on all systems with OS: Windows XP, Vista, Windows 7 and Windows 8.

Method tested me, gratitude Site


Södra Vagen 5b, 87140, Härnösand, Sverige +46 73-907 23 72 jarosstar @

About us


I am a designer. Here you can see my work. Well I do my job or not - to judge you.

The main rule - you'll never see the unfinished work. Only thoroughly polished project can produce in life.