|
|
|||||||
Korgers: I am looking after the Cd Key number placed in the XP sticker that is used for activation, ussually you need a 3rd party tool such as: http://www.product-key.com/ http://www.magicaljellybean.com/keyfinder.shtml In wich best practice with Kix would be: http://www.winkeyfinder.com But it is still 3rd party. Maybe someone have solved only using Kix. Thanks. note: Win32_WindowsProductActivation ProductID brings only the OEM itself. |
||||||||
|
|
|||||||
Jose, Well I hope you're not up to something that might get you into trouble, that said... here are some links you may find valuable. This site here has presented technical information on the method used. Licenturion - Fully Licensed GmbH, Rudower Chaussee 29, 12489 Berlin, Germany How to change the Windows XP Product Activation Key Code Unlocking WinXP's setupp.ini How to change the Volume Licensing product key on a Windows XP SP1-based computer XP Serial Change Windows XP Prompts You to Re-activate After You Restore Your Computer CD Key Reader RockXP |
||||||||
|
|
|||||||
Thanks for the tips DOC. I´ll take a look at thos links . I am not after something illegal, just wanna cross the information in the stickers with the ones already registered cause there have been some problems while activating XP´s in an untidy way, FE not sticking the number to the PC. BTW jlo? I was wondering if your KixBin can read and translate this value? Code:
Its something like this: a40000000300000035353639302d4f454d2d303035303133352d34323 63836002d0000004132322d303030303100000000000000bcc3c33bfe e41d444fd346478197030000000000d89701418485080002000000000 000000000000000000000000000000000000033373232310000000000 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 00000000000000000000000000000000000a506bfe4a4000000030000 0035353639302d4f454d2d303035303133352d3432363836002d00000 04132322d303030303100000000000000bcc3c33bfee41d444fd34647 8197030000000000d8970141848508000200000000000000000000000 000000000000000000000003337323231000000000000007b180000b3 3d8260fe000000c01f000000000000000000000000000000000000000 000000000000000000000a506bfe4a40000000300000035353639302d 4f454d2d303035303133352d3432363836002d0000004132322d30303 0303100000000000000bcc3c33bfee41d444fd3464781970300000000 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 0000000003337323231000000000000007b180000b33d8260fe000000 c01f00000000000000000000000000000000000000000000000000000 0000000a506bfe4 I have been trying but cannot do it, how about it? |
||||||||
|
|
|||||||
Being able to do this from Kixtart during the login script would be very useful. We haven't been very diligent in keeping track of the Office 2003 activation code that is associated with the Office installation on a PC. Being able to automate collecting this information with Kixtart help immensely when we have to reload PCs and therefor Office. Has anything done anything like this with Kixtart? V/ |
||||||||
|
|
|||||||
I see the need towards pure admin soltion to prevent certain me$.$.$.$.up´s.......causing dangerous harm to owrselfs. je je je. Althoght there is a Microsoft´s way of doing it, as DOC pointed above, we are in peace. |
||||||||
|
|
|||||||
I found a program called ProduKey that will extract the Windows and Office activation codes to a text file via the command line. I am now calling this program from Kixtart to track our product keys. V/ |
||||||||
|
|
|||||||
My guess would be the one from the link above which is from the guys who helped MS come up with this scheme Perhaps a link and further info from you would be nice. |
||||||||
|
|
|||||||
k, for the key jose gave, this snippet should give you a cdKey: Code:
|
||||||||
|
|
|||||||
Tried your code, and it does produce the key that shows up on the General Tab in System Properties... but Jose was looking for the... Quote: The one he is looking for is a 25 character alpha-numeric code. |
||||||||
|
|
|||||||
ja, realized that myself too... and started searching for it in this value. it's there. screwing with the bytearray gives weirdly different values. I even suspected, it could be base36() but no, maybe base32. anyways, not interested enough to go on with searching the correct "encryption" algorithm. |
||||||||
|
|
|||||||
Would this be of any use? Windows or Office Product Key Retrieval or Inside Windows Product Activation |
||||||||
|
|
|||||||
The first link I provided is the Company that worked on it for Microsoft. Which is also referenced in your 2nd link Al. I'm sure that with the help of KiXbinary it could be done, but still a time consuming task to digest all the information and come up with solid working KiXtart code. |
||||||||
|
|
|||||||
like said to jose, no, I don't see any reason there is need for kixBinary. kixBinary is merely a provider, just like your readvalue(), it won't crack stuff for you. |
||||||||
|
|
|||||||
hmm... the delphi code looks ok otherwise but... if I read it right, it gets the first 15 bytes of the dword value. now, those 15 bytes don't hold the value. instead, it seems (according to my cracks) that around the middle of the value is the needed data. why this difference, I do not know. |
||||||||
|
|
|||||||
or then I'm being fooled. richie, oh thee byte guru, this looks like something you could have your say in... dword, is it 8 bytes? |
||||||||
|
|
|||||||
and then... shl - shift left. used in the code with: A shl 8 that means, from the integer a, shift some 8 bytes to left. well, is there bytes in integer? even the delphi basics knows to tell that shl shouldn't be used but with binary data |
||||||||
|
|
|||||||
Quote: No. Fire up "calc" in advanced mode, switch to binary, select DWORD and subtract "1" - now count the "1"s. Quote: No, that's 8 bits. A simple way of doing an 8 bit shift left is to multiply the number by 256. For example, 13=1101 in binary. 13 * 256 = 3328, which is 110100000000 in binary - you will see that the 1101 has been shifted 8 bits to the left. |
||||||||
|
|
|||||||
Thanks very much for the support guys...specially Jooel the challenger man!!. Myself I have worked out with ProduKey.exe to a txt as Vincent suggested. I would be happy to help on the issue but I dont have much of a clue on it. Sorry. |
||||||||
|
|
|||||||
replaced with new reply as the board screwed up the html. |
||||||||
|
|
|||||||
couldn't get this working but... it has a "base" Code:
|
||||||||
|
|
|||||||
Very logical lonkero´s style. je je. Me trying to understand it. |
||||||||
|
|
|||||||
Got this far with it: Code: Break ON Unfortunately I have to deal with an Exchange 5.5 restore so I'm not going to take it any further - somethings not quite right, either I'm picking up the wrong offset of the math is screwy. Note the "^" - this resquires 4.50 RC1 which has XOR built in. |
||||||||
|
|
|||||||
Lonk, Richard... any luck figuring this out? |
||||||||
|
|
|||||||
nah, been too busy with my video scroll trough that haven't been able to do anything usefull. |
||||||||
|
|
|||||||
Hi All, I fixed a couple of things in Richard's code. The working script is below... Code:
I hope that helps. Regards, Christian |
||||||||
|
|
|||||||
you missed the "get $" but otherwise, nice... thanks. |
||||||||
|
|
|||||||
Thanks for finishing that off Christian, the offset count was giving me a headache! |
||||||||
|
|
|||||||
Very nice! Christian, Richard... Do one of you want to add this to the UDF collection? |
||||||||
|
|
|||||||
Here's a slightly modified version packaged in a function. Code:
Does anyone have any suggestions on the most appropriate name for the function? Regards, Christian. |
||||||||
|
|
|||||||
now... what product keys this works with? |
||||||||
|
|
|||||||
It works with Office 2003 and SQL Server 2000, some quick code to do this is shown below. Finding the location of the Office 2003 key is a bit of a hack, there may be a more elegant way. The code would need error checking added before being put in to production use. Code:
It probably works with other Microsoft products but I don't have any others installed to try it with. Regards, Christian. |
||||||||
|
|
|||||||
w2k - works. |
||||||||
|
|
|||||||
Just to golf it down a little... Code:
|
||||||||
|
|
|||||||
Thanks Christian - works well on my system. Thanks for Registering to post this. Code:
|
||||||||
|
|
|||||||
I'd like to see the UDF include "known product" registry locations. ie... getproductkey(1) = XP, getproductkey(2) = OfficeXP, etc. But also leave it open to future registry locations that can be typed in like it is now. But for my use I'll probably only use this for the XP key. Code:
|
||||||||
|
|
|||||||
well, sadly that's not XP key, but windows' cdkey |
||||||||
|
|
|||||||
I stand corrected... the Windows XP key, is what I'll use this for |
||||||||
|
|
|||||||
Well putting a couple of UDFs together we can search for ALL the products and have them output the ProductName and Key something like this
Using the SearchReg() UDF from Kholm http://www.kixtart.org/ubbthreads/showflat.php?Cat=0&Number=83331 and the updated one from Christian and Golfed by Chris I came up with this. |
||||||||
|
|
|||||||
thanks again for this awesome script! |
||||||||
|
|
|||||||
This needed a little updating for x64 systems and to take in consideration the newer DigitalProductID for Office 2010. I couldn't figure out the Golfed version's math, so I reverted to the original version above. Office 2010 does not have a ProductID to give you easy way out for the Product Name, so I did the best I could. If someone knows a better way, please update this. |
||||||||
|
|
|||||||
Thanks Allen, I don't have 2010 on here at the moment but if I remember I'll check it out when I do put it on. |
||||||||
|
|
|||||||
dont work for win7 64bit. if someone has more free time than I, could looky at: http://www.vbforums.com/showthread.php?622160-RESOLVED-DigitalProductId-VB-2010-on-Win7-x64 otherwise I need to come back and take a crack at it. the original code returns BBBBBBBBBBBBBBBBBB and allen's version returns nothing. |
||||||||
|
|
|||||||
What version of Office. I've used this repeatedly with XP, Vista, Win7 32bit or 64bit. Edit... just saw you say Win7 64 itself.... ah... not sure about that... |
||||||||
|
|
|||||||
yea, works with winXP. but I need win7 |
||||||||
|
|
|||||||
it seems to work on win7 too now... at least for some. that is odd. |
||||||||
|
|
|||||||
FYI... I have not had time to hunt down the info on how it has changed, but I know that none of the versions posted above work with Office 2013 or Windows 8. |
||||||||
|
|
|||||||
windows 8? is someone already using it? /sent from my home vista laptop/ |
||||||||
|
|
|||||||
If anyone want to take a stab at merging this with the versions above, here is a vbscript that gets the Windows 8 product key. I have yet to find any information on how to get Office 2013 keys. Code: Option Explicit Dim strComputer, objWMIService, objItem, Caption, colItems 'Create wscript.shell object strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colItems = objWMIService.ExecQuery("Select * from Win32_OperatingSystem",,48) For Each objItem in colItems Caption = objItem.Caption Next If InStr(Caption,"Microsoft Windows 8") > 0 Then Dim objshell,path,DigitalID, Result Set objshell = CreateObject("WScript.Shell") 'Set registry key path Path = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\" 'Registry key value DigitalID = objshell.RegRead(Path & "DigitalProductId") Dim ProductName,ProductID,ProductKey,ProductData 'Get ProductName, ProductID, ProductKey ProductName = "Product Name: " & objshell.RegRead(Path & "ProductName") ProductID = "Product ID: " & objshell.RegRead(Path & "ProductID") ProductKey = "Installed Key: " & ConvertToKey(DigitalID) ProductData = ProductName & vbNewLine & ProductID & vbNewLine & ProductKey 'Show messbox if save to a file If vbYes = MsgBox(ProductData & vblf & vblf & "Save to a file?", vbYesNo + vbQuestion, "BackUp Windows Key Information") then Save ProductData End If Else MsgBox "Please run this script in Windows 8.x" End If 'Convert binary to chars Function ConvertToKey(Key) Const KeyOffset = 52 Dim isWin8, Maps, i, j, Current, KeyOutput, Last, keypart1, insert 'Check if OS is Windows 8 isWin8 = (Key(66) \ 6) And 1 Key(66) = (Key(66) And &HF7) Or ((isWin8 And 2) * 4) i = 24 Maps = "BCDFGHJKMPQRTVWXY2346789" Do Current= 0 j = 14 Do Current = Current* 256 Current = Key(j + KeyOffset) + Current Key(j + KeyOffset) = (Current \ 24) Current=Current Mod 24 j = j -1 Loop While j >= 0 i = i -1 KeyOutput = Mid(Maps,Current+ 1, 1) & KeyOutput Last = Current Loop While i >= 0 keypart1 = Mid(KeyOutput, 2, Last) insert = "N" KeyOutput = Replace(KeyOutput, keypart1, keypart1 & insert, 2, 1, 0) If Last = 0 Then KeyOutput = insert & KeyOutput ConvertToKey = Mid(KeyOutput, 1, 5) & "-" & Mid(KeyOutput, 6, 5) & "-" & Mid(KeyOutput, 11, 5) & "-" & Mid(KeyOutput, 16, 5) & "-" & Mid(KeyOutput, 21, 5) End Function 'Save data to a file Function Save(Data) Dim fso, fName, txt,objshell,UserName Set objshell = CreateObject("wscript.shell") 'Get current user name UserName = objshell.ExpandEnvironmentStrings("%UserName%") 'Create a text file on desktop fName = "C:\Users\" & UserName & "\Desktop\WindowsKeyInfo.txt" Set fso = CreateObject("Scripting.FileSystemObject") Set txt = fso.CreateTextFile(fName) txt.Writeline Data txt.Close End Function |
||||||||
|
|
|||||||
to me the only thing that seems to be valuable from that code are these two lines: Code: isWin8 = (Key(66) \ 6) And 1 Key(66) = (Key(66) And &HF7) Or ((isWin8 And 2) * 4) so, the last bit is mingled with if windows 8 is the OS. otherwise the code is exactly the same? |
||||||||
|
|
|||||||
Are we certain that the above VB code works? I have tried it on Windows 10 32-bit and 64-bit and got varying results. I assume 10 is not that different from 8 as far as the DigitalProductID is concerned. @dos on Win 10 now gives a value of 10.0, when Win 10 first came out it was 6.2, the same as Win 8.x (I think, as I never got into 8). Cheers, |
||||||||
|
|
|||||||
I wrote a keyfinder a long(!) time ago in KixForms (the non-.net version) based on some of Lonk's code. Might be of some help. Code: Break On $System = CreateObject("Kixtart.System") ;KD START $Form = $System.Form() $Form.BackColor = 235,233,237 $Form.FontSize = 8,25 $Form.Height = 255 $Form.Text = "KeyFinder" $Form.Width = 455 $Button1 = $Form.Controls.Button() $Button1.FontSize = 8,25 $Button1.Height = 33 $Button1.Left = 15 $Button1.Text = "Exit" $Button1.Top = 165 $Button1.Width = 420 $Button1.OnClick = "$$=$$Form.Hide()" $ListViewEx1 = $Form.Controls.ListView() $ListViewEx1.FontSize = 8,25 $ListViewEx1.Height = 134 $ListViewEx1.Left = 15 $ListViewEx1.Top = 15 $ListViewEx1.Width = 420 $=$ListViewEx1.Columns.Add("Product",200) $=$ListViewEx1.Columns.Add("Key Code",215) ;KD END $Form.Show StartScript While $Form.Visible $=Execute($Form.DoEvents()) Loop Exit 1 Function StartScript() $Form.Text = "KeyFinder - SEARCHING!!!!" $ListViewEx1.Items.Clear $ListViewEx1.Enabled = 0 $ListViewEx1.BeginUpdate Dim $RegArray,$Value,$Product,$Key $RegArray = SearchReg("HKLM\Software\Microsoft","DigitalProductID",2) If @Error 'No matching items found' ? Else For Each $Value In $RegArray If $Value $Product = ReadValue(Join(Split($value,'<=>DigitalProductId'),''),'ProductName') If $Product $Key = Get_Product_Key(ReadValue(Join(Split($value,'<=>DigitalProductId'),''), 'DigitalProductID')) $Item = $ListViewEx1.Items.Add($Product) $Item.SubItems(1).Text = $Key ; $Product + ': ' + $Key ? EndIf EndIf Next EndIf $ListViewEx1.EndUpdate $ListViewEx1.Enabled = 1 $Form.Text = "KeyFinder - Finished!" EndFunction Function SearchReg($Key,$Str,$SrcIn) Dim $Idx,$vName,$Value,$num,$SubKey,$fArr,$mbr $SearchReg = '' $num = 0 $Idx = 0 $vName = EnumValue($Key,$Idx) Do $mbr = '' If $SrcIn & 1 $Value = ReadValue($Key,$vName) If InStr($Value,$Str) $mbr = $Key + "<=>" + IIf($vName,$vName,'<Default>') EndIf EndIf If ($SrcIn & 2) AND InStr($vName,$Str) $mbr = $Key + "<=>" + $vName EndIf If $mbr ReDim Preserve $SearchReg[$num] $SearchReg[$num] = $mbr $num = $num + 1 EndIf $Idx = $Idx + 1 $vName = EnumValue($Key,$Idx) Until @Error $Idx = 0 $SubKey = EnumKey($Key,$Idx) While $SubKey If ($SrcIn & 4) AND InStr($SubKey,$Str) ReDim Preserve $SearchReg[$num] $SearchReg[$num] = $Key + '\' + $SubKey + "<=><KeyName>" $num = $num + 1 EndIf $fArr = SearchReg($Key + "\" + $SubKey,$Str,$SrcIn) If @Error = 0 For Each $mbr In $fArr ReDim Preserve $SearchReg[$num] $SearchReg[$num] = $mbr $num = $num + 1 Next EndIf $Idx = $Idx + 1 $SubKey = EnumKey($Key,$Idx) Loop Exit VarType($SearchReg) = 8 EndFunction Function Get_Product_Key($sProductID) Dim $aiKeyChars[24],$bProductKey[15],$ilByte,$i,$sCDKey,$nCur $aiKeyChars = 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',',') For $i = 0 To 14 $bProductKey[$i] = Val("&"+SubStr($sProductID,$i*2+105,2)) Next $sCDKey = "" For $ilByte = 24 To 0 Step -1 $nCur = 0 For $i=14 To 0 Step -1 $nCur = $nCur * 256 | $bProductKey[$i] $bProductKey[$i] = Int($nCur / 24) $nCur = $nCur Mod 24 Next $sCDKey = $aiKeyChars[$nCur] + $sCDKey If $ilByte Mod 5 = 0 AND $ilByte <> 0 $sCDKey = "-" + $sCDKey EndIf Next $Get_Product_Key = $sCDKey EndFunction |
||||||||
|
|
|||||||
Thanks Arend_ I'll try it out. Cheers, |