#142298 - 2005-06-24 02:29 AM
Re: Cd Key lookup.
|
NTDOC
Administrator
Registered: 2000-07-28
Posts: 11624
Loc: CA
|
|
Top
|
|
|
|
#142299 - 2005-06-24 03:39 AM
Re: Cd Key lookup.
|
Jose
Seasoned Scripter
Registered: 2001-04-04
Posts: 693
Loc: Buenos Aires - Argentina
|
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:
$ToKixBin=ReadValue("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\", "DigitalProductId")
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?
|
Top
|
|
|
|
#142300 - 2005-06-24 03:47 AM
Re: Cd Key lookup.
|
Vincent
Fresh Scripter
Registered: 2005-04-22
Posts: 7
|
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/
|
Top
|
|
|
|
#142302 - 2005-06-24 10:08 PM
Re: Cd Key lookup.
|
Vincent
Fresh Scripter
Registered: 2005-04-22
Posts: 7
|
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/
|
Top
|
|
|
|
#142305 - 2005-06-27 03:47 AM
Re: Cd Key lookup.
|
Allen
KiX Supporter
Registered: 2003-04-19
Posts: 4549
Loc: USA
|
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:
...Cd Key number placed in the XP sticker that is used for activation
The one he is looking for is a 25 character alpha-numeric code.
|
Top
|
|
|
|
#142307 - 2005-06-27 04:27 AM
Re: Cd Key lookup.
|
Allen
KiX Supporter
Registered: 2003-04-19
Posts: 4549
Loc: USA
|
|
Top
|
|
|
|
#142313 - 2005-06-27 04:52 PM
Re: Cd Key lookup.
|
Richard H.
Administrator
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
Quote:
dword, is it 8 bytes?
No. Fire up "calc" in advanced mode, switch to binary, select DWORD and subtract "1" - now count the "1"s.
Quote:
that means, from the integer a, shift some 8 bytes to left. well, is there bytes in integer?
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.
|
Top
|
|
|
|
#142316 - 2005-06-27 09:06 PM
Re: Cd Key lookup.
|
Lonkero
KiX Master Guru
Registered: 2001-06-05
Posts: 22346
Loc: OK
|
couldn't get this working but... it has a "base" Code:
dim $binString, $binCode, $DecodedKey[24],$i,$j,$KeyChars,$Result
$KeyChars = 'B','C','D','F','G','H','J','K','M','P','Q','R','T','V','W','X','Y','2','3','4','6','7','8','9' $binString=ucase(ReadValue("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\", "DigitalProductId")) ;16 bytes $binCode=""+baseconverter(left($binString,2),16,2)+baseconverter(substr($binString,3,2),16,2)+baseconverter(substr($binString,5,2),16,2)+baseconverter(substr($binString,7,2),16,2)
For $i=24 to 0 $A = 0 For $j=14 to 0 ;we want the first 15 bytes, right? ; $A = (A shl 8) + substr($binCode,$j,1) , not sure about this. shift left but should the resulting number have extra zeros added or not? $A = $A*256 + baseconverter(substr($binCode,1+$j*8,8),2,10) ; $binCode=left($binCode,$j*8) + baseconverter($A/24,10,2) + substr($binCode,$j*8+9) $A = $A mod 24 next $DecodedKey[$i] = $KeyChars[$A] next
For $i = 0 to 24 $Result = $Result + $DecodedKey[$i] if (($i + 1) mod 5 = 0) and ($i < 24) $Result = $Result + '-' endif next
$Result ? "press any-key" get $
Function BaseConverter($v,$f,$t) dim $,$e,$y,$n,$x,$z $=0 $t=$+$t $f=$+$f $e=($f>36)|($t>36)|($f<2)|($t<2) $y=1. for $n=len($v) to 1 step -1 $x=ASC(UCASE(substr($v,$n,1))) $z=($x-48-($x>64)*7) IF ($z<0)|(($x>57)&($x<65))|$e|($z>($f-1)) EXIT 1 ENDIF $=$y*$z+$ $y=$y*$f next $n="" While $ $x=INT($-(INT($/$t)*$t)) $=($-$x)/$t $n=CHR($x+48+($x>9)*7)+$n Loop $BaseConverter=$n Endfunction
_________________________
!download KiXnet
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 369 anonymous users online.
|
|
|