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
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...
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.
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?
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.
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 !
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