Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - how to fins a Reg key when you only know a value that sits under i

Reply
 
Old 11-20-2008   #1 (permalink)
GazzaJagman


 
 

how to fins a Reg key when you only know a value that sits under i

Can anyone help me with this?
I am trying to find a unique reg key but I don't know what the key is. I can
identify it by a Value name and Value Data.

HKLM/System/CurrentControlSet/Control/Class/{Big long Guid}/XYZ
The String Value name is "VlanName" and it's value is "Main"

I need to find out the {big long GUID}/XYZ part of the Registry key.

Any ideas or thoughts how i can do this would be greatly appreciated?


--
"Science is what we hope for...Technology is what we get stuck with"

My System SpecsSystem Spec
Old 11-20-2008   #2 (permalink)
mayayana


 
 

Re: how to fins a Reg key when you only know a value that sits under i

Without using extra components, VBS has two ways
available to access the Registry. WScript.Shell can do
simple operations but can't enumerate Registry keys
or values. WMI can enumerate with the StdRegProv
object, but it's a clunky, poorly designed tool. (Even
the name "StdRegProv" is a name that only a geek
could love.

If you're interested you can take a look at this class:
www.jsware.net/jsware/scripts.php5#wmirclas

It encapsulates the WMI Registry mess into a VBS class
and translates it into easy public functions like EnumKeys,
EnumValues, etc.
Quote:

> Can anyone help me with this?
> I am trying to find a unique reg key but I don't know what the key is. I
can
Quote:

> identify it by a Value name and Value Data.
>
> HKLM/System/CurrentControlSet/Control/Class/{Big long Guid}/XYZ
> The String Value name is "VlanName" and it's value is "Main"
>
> I need to find out the {big long GUID}/XYZ part of the Registry key.
>
In Registry parlance, the name is called a value and
the content is called the "data". It's confusing because
they used the INI format but messed it up. In INI files
there are sections, which hold key=value pairs. In the
Registry they used the same terms but switched their
positions. There are keys, which hold value/data pairs.

What you need to do is to enumerate the parent key.
It sounds like you're looking for the CLSID key, so you'll
need to enumerate all keys under the Class key. Then with
each of those you'll have to check for the key\value
XYZ\VlanName. When you get that without error you'll
have found your CLSID (GUID) key.
Quote:

> Any ideas or thoughts how i can do this would be greatly appreciated?
>
>
> --
> "Science is what we hope for...Technology is what we get stuck with"

My System SpecsSystem Spec
Old 11-20-2008   #3 (permalink)
urkec


 
 

Re: how to fins a Reg key when you only know a value that sits und

"mayayana" wrote:
Quote:

> Even the name "StdRegProv" is a name that only a geek
> could love.

True. I love the name.

--
urke
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
poor quality pictures on web sits Vista performance & maintenance
DVD Maker Sits at 0% for hours - Decoding Vista music pictures video
Seeking magnifier that sits on the taskbar. Vista General
Movie maker just sits while publishing; not frozen Please Help Vista music pictures video


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46