Hi All,

I fixed a couple of things in Richard's code. The working script is below...
Code:

Break ON
$=SetOption("WrapAtEOL","ON")

Dim $aiKeyChars[24]
Dim $sProductID
Dim $ilByte
Dim $i

$i=0
For Each $c In Split("B C D F G H J K M P Q R T V W X Y 2 3 4 6 7 8 9")
$aiKeyChars[$i]=Asc($c)
$i=$i+1
Next

$sProductID=ReadValue("HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\Windows NT\CurrentVersion","DigitalProductID")

Dim $bProductKey[15]
For $i = 53*2-1 To 67*2-1 Step 2
$bProductKey[($i-(53*2-1))/2]=Execute("Exit &"+SubStr($sProductId,$i,2))
Next

;Now we are going to 'base24' decode the Product Key

For $ilByte = 24 To 0 Step -1
;Step through each character in the CD key
$nCur = 0

For $i=14 To 0 Step -1
;Step through each byte in the Product Key
$nCur = $nCur * 256 ^ $bProductKey[$i] ; NOTE THE XOR!
$bProductKey[$i] = Int($nCur / 24)
$nCur = $nCur Mod 24
Next
$sCDKey = Chr($aiKeyChars[$nCur]) + $sCDKey
If $ilByte Mod 5 = 0 And $ilByte <> 0 $sCDKey = "-" + $sCDKey EndIf
Next

$sCDKey ?



I hope that helps.
Regards,
Christian