Page 1 of 1

queryregistry not returning dword values

Posted: Thu Jun 14, 2012 8:24 pm
by rinzwind
At least on 64 bit Windows 7.
LiveCode 5.5

For example:
put queryRegistry("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowInfoTip") into tTest

Returns empty string.Bug?

reg_sz types are working correctly..

Also while trying something I saw that

put binaryDecode("I", queryRegistry("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowInfoTip")) into tTest
just quiets the function immediately altogether without error

Re: queryregistry not returning dword values

Posted: Fri Jun 15, 2012 1:27 pm
by Mark
Hi,

You didn't specify dword as a typeVariable (read the LiveCode dictionary).

The correct form of the binaryDecode function is:

binaryDecode(formatsList,data,variablesList)

Kind regards,

Mark

Re: queryregistry not returning dword values

Posted: Fri Jun 15, 2012 1:53 pm
by rinzwind
That won't help as it' s an optional output variable, not input.
It will return dword when used. As I said other types are working.

Re: queryregistry not returning dword values

Posted: Fri Jun 15, 2012 2:04 pm
by Mark
Hi,

You're right about the output variable. What happens if you finish the path with "\dword"? Did you try that already? I think I got this working in one of my projects so it should be possible. If you can't solve it in LC, you could write a VBScript to query the registry and pass the result on to LC.

I noticed that you use "I" as the encoding format. Usually, I use "h*" to decode registry data.

Kind regards,

Mark

Re: queryregistry not returning dword values

Posted: Fri Jun 15, 2012 2:10 pm
by rinzwind
Succeeded!
It was probably some non printable character that queryRegistry returned with some dword reg values.
put binaryDecode("I", queryRegistry("HKEY_CURRENT_USER\Test\Dword"), tValue)
is working. The result is put into ta and the return value is the number of successfully converted values.
Thanks!