Glenn9999, on 15 March 2010 - 12:25 AM, said:
Ozzyguy, on 14 March 2010 - 09:40 PM, said:
If anyone with delphi knowledge would mind checking it out, id be most happy.
I don't have Office 2010, so I don't have a way to test (but I would love to, I would like a good implementation of this in Delphi I know works). But I can look at the code and see what I see.
It appears from the script posted by Cluberti that you need to iterate through all the keys on the main path and then check the key from there. It appears you're just taking a full path and going straight into checking for the value itself, and not checking the branch for existence. Duplicate what is happening here and you should have better results.
Dim strKey, subkey, arrSubkeys2, strOfficeKey, strValue
strKey = "SOFTWARE\Microsoft\Office\14.0\Registration"
ScriptHelper.Registry.EnumKey HKEY_LOCAL_MACHINE, strKey, arrSubkeys2
If IsNull(arrSubkeys2) Then
'Office 2010 not installed, skip it
arrSubKeys(4,1) = ""
Else
For Each subkey In arrSubkeys2
ScriptHelper.Registry.GetBinaryValue HKEY_LOCAL_MACHINE, strKey & "\" & subkey, SEARCH_KEY, strValue
If IsNull(strValue) Then
strOfficeKey = ""
Else
strOfficeKey = strKey & "\" & subkey
arrSubKeys(4,1) = strOfficeKey
End If
Next
End If
Thanks for your reply mate.
Yes im using my sub key branch at the moment just to test.
But, the algorithm either just doesnt work Office 2010 , or the location of the key has changed, ie the start offset (34H) and 15 byte length, which would return the Key read error.
My mate is the real programmer here, im just searching for some info on the 2010 DigitalProductID, as we have tried everything, and cant get the key to be displayed.
Every other Windows build, and office version is catered for, except this one.
2010 has us stumped at present.



Help

Back to top











