queryregistry not returning dword values

Deploying to Windows? Utilizing VB Script execution? This is the place to ask Windows-specific questions.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
rinzwind
Posts: 135
Joined: Tue May 01, 2012 10:44 am

queryregistry not returning dword values

Post by rinzwind » Thu Jun 14, 2012 8:24 pm

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

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: queryregistry not returning dword values

Post by Mark » Fri Jun 15, 2012 1:27 pm

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
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

rinzwind
Posts: 135
Joined: Tue May 01, 2012 10:44 am

Re: queryregistry not returning dword values

Post by rinzwind » Fri Jun 15, 2012 1:53 pm

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.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: queryregistry not returning dword values

Post by Mark » Fri Jun 15, 2012 2:04 pm

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
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

rinzwind
Posts: 135
Joined: Tue May 01, 2012 10:44 am

Re: queryregistry not returning dword values

Post by rinzwind » Fri Jun 15, 2012 2:10 pm

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!

Post Reply