Using the Windows 8.1 command prompt to view Windows activation key

2

I am not able to access my control panel, probably due to some corrupt system files. And to request help from Microsoft, I need to give them my Windows 8.1 product key. So is there any way I can access my Windows 8.1 product key using the command prompt?

Thank you.

Ralph David Abernathy

Posted 2014-03-09T16:24:37.653

Reputation: 215

Answers

1

ProduKey, works with these and more

Microsoft Windows 8
Microsoft Windows 7
Microsoft Windows Vista

ProduKey - Recover lost product key of Windows

Steven Penny

Posted 2014-03-09T16:24:37.653

Reputation: 7 294

3

As far as I know you cannot do that using the old command prompt. However, you can find your key if you use powershell. In order to find it, you'll have to run the following script (it suffices to copy & paste it in powershell and then press enter) :

    # create table to convert in base 24 
$map="BCDFGHJKMPQRTVWXY2346789" 
# Read registry Key 
$value = (get-itemproperty "HKLM:\\SOFTWARE\Microsoft\Windows NT\CurrentVersion").digitalproductid[0x34..0x42] 
# Convert in Hexa to show you the Raw Key 
$hexa = "" 
$value | foreach { 
  $hexa = $_.ToString("X2") + $hexa 
} 
"Raw Key Big Endian: $hexa" 

# find the Product Key 
$ProductKey = "" 
for ($i = 24; $i -ge 0; $i--) { 
  $r = 0 
  for ($j = 14; $j -ge 0; $j--) { 
    $r = ($r * 256) -bxor $value[$j] 
    $value[$j] = [math]::Floor([double]($r/24)) 
    $r = $r % 24 
  } 
  $ProductKey = $map[$r] + $ProductKey  
  if (($i % 5) -eq 0 -and $i -ne 0) { 
    $ProductKey = "-" + $ProductKey 
  } 
} 
"Product Key: $ProductKey" 

celalalt

Posted 2014-03-09T16:24:37.653

Reputation: 133