How to decrypt the Pkey that found in the registry?!

Discussion in 'Windows 7' started by darkness86, Aug 4, 2009.

  1. darkness86

    darkness86 MDL Novice

    Dec 26, 2008
    20
    0
    0
    thanks for your help guys,.... thank you Daz, you rock....
     
  2. BlueZ

    BlueZ MDL Novice

    Jun 12, 2009
    31
    0
    0
    #24 BlueZ, Aug 13, 2009
    Last edited by a moderator: May 23, 2017
  3. ifeife2

    ifeife2 MDL Member

    Apr 25, 2008
    134
    3
    10
    thanks Daz and sunnybear for the sharing spirit

    @green.ag, i haven't tried these yet on any volume installs of the OS or office
     
  4. green.ag

    green.ag MDL Novice

    Jul 20, 2009
    7
    0
    0
    there are another key DigitalProductId4, but with changed vbs key is still wrong
     
  5. darkness86

    darkness86 MDL Novice

    Dec 26, 2008
    20
    0
    0
    #29 darkness86, Aug 13, 2009
    Last edited: Aug 13, 2009
    (OP)
    Thanks sunnybear worked perfectly....

    for the Office key, The {GUID} is not the same for the different office version, how we make the code get the ID then return the key?

    "HKLM\SOFTWARE\Microsoft\Office\12.0\Registration\{GUID}\"

    thanks...
     
  6. Daz

    Daz MDL Developer / Admin
    Staff Member

    Jul 31, 2009
    9,534
    67,253
    300
    Yeah, I happened to make this code a few years ago for one of my projects. Theres plenty of documentation on how to do it and I proberbly could come up with a few ways to output the same result, but why reinvent the wheel right? All I had to do this time was pull the existing code from one of my projects and change it just a little to run as VBScript.

    @ darkness86
    That would proberbly require registry scanning for "0FF1CE", presuming it always ends in that. I personally can't test as I dont have office at the moment but im sure one of the other guys that do have office and have worked from my base code can get something working.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. twiz

    twiz MDL Senior Member

    Jul 30, 2009
    401
    1
    10
    Couldn't you have it just read/load everything from "HKLM\SOFTWARE\Microsoft\Office\12.0\Registration\" and then find the "ProductName" and "DigitalProductID" for every {GUID}?

    I doubt (m)any people will have two versions of Office installed, so only one set of values should be returned.

    I don't know much about working in the registry via code, but if there is a way to 'scan' I would guess that limiting it to a particular tree would be a lot faster than scanning the whole registry.


    Alternatively it really shouldn't be too hard to make a full list of the {GUID}s used and have it run til you get a hit...
    Does the "\12.0\" section change between versions too?
     
  8. Daz

    Daz MDL Developer / Admin
    Staff Member

    Jul 31, 2009
    9,534
    67,253
    300
    Yeah, that would be the search/loop method im on about. You can do a full registry search or start from a specific location, in this case "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\".

    Personally I have turned to other languages and don't use VBScript or even VB often and without MS Office installed myself to see if my code would even work its really not worth me even trying. I'm not sure if the version ID would be different, but I suggested "0FF1CE" as the primary scan word for the loop as this would likely speed up the process by only checking known paths.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. BlueZ

    BlueZ MDL Novice

    Jun 12, 2009
    31
    0
    0
    #33 BlueZ, Aug 15, 2009
    Last edited: Aug 15, 2009
    I'm truly sorry Green, but not much i can do at the present. :(
    I don't have an installed copy of the Enterprise version, so I cannot test to verify what's wrong. If you have any expertise in programming, try to step through the code and you'll figure it out. It's rather simple.
    Or ask Daz. The main conversion() algorithm is from him. I just added some frills around it, plus the possibility to save the result.

    Good luck.

    Oopsy ! I think the answer is a few messages above. Nothing wrong with the script or Daz's algorithm: it seems that for the Enterprise version, the Registry key does NOT contain any valid key. Which would explain why you're getting this funny-looking output !
    If the script caused an error, you simply wouldn't get any output !
     
  10. Tfinney110

    Tfinney110 MDL Novice

    Dec 5, 2012
    2
    0
    0

    Hi I'm actually looking for pretty much the same thing except here is my situation: when I went to reinstall my windows 7 64bit I copied down the wrong key (the product key) and when I went to reinstall windows 7, I reformatted thinking I had the correct cd key and went on with the installation but I was very wrong. So now I'm stuck at the activation screen until I can figure out (if possible) my windows 7 cd key. I have another PC I can get on to run code if someone figures out how to decrypt what I'm looking for. Hope this isnt considering jacking. Thanks