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.
> 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.
> 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.
> 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"