Reinstall and restore key

Discussion in 'Windows 7' started by TheWildOne, Nov 19, 2010.

  1. TheWildOne

    TheWildOne MDL Novice

    Nov 19, 2010
    19
    0
    0
    hello all,

    i have windows 7 proff. when i run the key finder it shows as BBBB-BBBB-...

    i think i have a MAK key installed. i want to format and reinstall the OS. How can i restore they key and activation?

    Could any one point me to right direction

    Cheers,
     
  2. Pierre26

    Pierre26 MDL Novice

    Oct 4, 2009
    33
    3
    0
    #2 Pierre26, Nov 21, 2010
    Last edited: Nov 21, 2010
    Stop using pieces of sh...! Instead, open a the ''Bloc notes'' or a text file and paste this :
    Dim objFS, objShell
    Dim strXPKey

    Set objShell = CreateObject("WScript.Shell")

    strXPKey = objShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductName")
    If Len(strXPKey) > 0 Then

    WScript.Echo "" & GetKey(objShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId"))

    End If

    Function GetKey(rpk)
    Const rpkOffset=52:i=28
    szPossibleChars="BCDFGHJKMPQRTVWXY2346789"
    Do
    dwAccumulator=0 : j=14
    Do
    dwAccumulator=dwAccumulator*256
    dwAccumulator=rpk(j+rpkOffset)+dwAccumulator
    rpk(j+rpkOffset)=(dwAccumulator\24) and 255
    dwAccumulator=dwAccumulator Mod 24
    j=j-1
    Loop While j>=0
    i=i-1 : szProductKey=mid(szPossibleChars,dwAccumulator+1,1)&szProductKey
    if (((29-i) Mod 6)=0) and (i<>-1) then
    i=i-1 : szProductKey="-"&szProductKey
    End If
    Loop While i>=0
    GetKey=szProductKey
    End Function
    Then ''save'' if you want for example as is and close, then you can change the file extension as ''vbs'' instead of ''txt''
    Left clic on it and you will see your key !
    And see Flie attached for the token.dat and the *.xrm-ms : you need also them !
     

    Attached Files:

  3. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,527
    4,112
    270
  4. Phazor

    Phazor MDL Expert

    Sep 1, 2009
    1,144
    518
    60
    Never post code snippets without using the code tags!

    (At least not if you want people to copy and paste the code.)

    Otherwise the forum soft will introduce phantom-spaces in very long space-less lines; see Micr osoft and SOFTWA RE
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. TheWildOne

    TheWildOne MDL Novice

    Nov 19, 2010
    19
    0
    0
    thanks a lot. unfortunately it looks like my laptop dvd drive doesn't seem to work. USB boot option also is not working :-(
     
  6. TheWildOne

    TheWildOne MDL Novice

    Nov 19, 2010
    19
    0
    0
    thanks dude. let me give a try on that
     
  7. TheWildOne

    TheWildOne MDL Novice

    Nov 19, 2010
    19
    0
    0
    All working fine now. Thanks guys for your support.
     
  8. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,527
    4,112
    270
    It's nice to know what of our advice you did?