Actually the original info above didn't work - it was returning 1 because that was the data type (ie binary) - and your example key had only binary value 1 stored, so the result was the same.
There is an optional type variable you can use in the queryRegistry function which will return the data type of the key. To actually obtain the value you can just put the queryRegistry result into a variable, as:
Code: Select all
put binaryDecode("I",queryRegistry("HKEY_CURRENT_USER\Software\MyKey\MyValueName"),tTypeValue) into tValue
tValue will hold the binaryDecoded result, and tTypeValue will hold 1 (as the key holds binary data), or ignoring the type, just
Code: Select all
put binaryDecode("I",queryRegistry("HKEY_CURRENT_USER\Software\MyKey\MyValueName")) into tValue
tValue will hold the binaryDecoded result. (You need to look up the binaryDecode function to make sure that you decode the right number of bytes).
If it is regular numeric data in the dword key, then
Code: Select all
put queryRegistry("HKEY_CURRENT_USER\Software\MyKey\MyValueName"),tTypeValue) into tValue
tValue will hold the key data, and tTypeValue will hold "dword", again the type variable is optional:
Code: Select all
put queryRegistry("HKEY_CURRENT_USER\Software\MyKey\MyValueName") into tValue
to return the key data into tValue.
String data is handled very simply:
Code: Select all
put queryRegistry("HKEY_CURRENT_USER\Software\MyKey\MyValueName", tTypeValue) into tValue
tValue holding the key data string, and tTypeValue holding "string" - again tTypeValue is optional, so
Code: Select all
put queryRegistry("HKEY_CURRENT_USER\Software\MyKey\MyValueName") into tValue
will hold the key data string.