Using queryRegistry with entries with "\"

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
hwbehrens
Posts: 19
Joined: Fri Mar 19, 2010 9:10 pm

Using queryRegistry with entries with "\"

Post by hwbehrens » Thu Oct 14, 2010 4:28 pm

I took a look at this post, but I'm a complete newbie when it comes to the Windows registry, so it went completely over my head.

I am trying to access the data located in the following registry entry:
HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM\Device\VCP0

You can see a screenshot of my RegEdit here.

However, when I use the following command:

Code: Select all

put queryregistry("HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM\Device\VCP0")
I just get an empty string. However, you can see in the screenshot that there is definitely a value in there.

Any ideas on what I'm doing wrong? I'm guessing the issue is because my key includes "\" in the name, but I'm not sure what to do instead. I tried using the 'queryRegistry(keyPath,typeVariable)' form as well, but my typeVariable just got populated by garbage data (ƒìS‹\$ UV‹s35 rb).

SirWobbyTheFirst
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 246
Joined: Tue Jun 30, 2009 11:15 pm

Re: Using queryRegistry with entries with "\"

Post by SirWobbyTheFirst » Tue Nov 16, 2010 2:13 am

Hi hwbehrens

I don't think the standard Win32 API (Which is what almost every Windows application uses except for the boot up ones) supports using \Device\VCP0 as a registry value name. According to Microsoft that is an illegal path in the Win32 API and thus any attempts from Rev will cause Windows to think there is a sub key called Device underneath SERIALCOMM with the value VCP0.

There is nothing anybody can do about it really. RegEdit can read because it uses other APIs asside from the Win32 in order to access the registry nuts and bolts.

Hope this helps dude. Michael.

Post Reply