Paul
Thu Jun 14 19:19:06 CDT 2007
"Mark Pryor" <tlviewer@VISTAyahoo.com> wrote in message
news:4671ce72$0$8055$4c368faf@roadrunner.com...
> On Thu, 14 Jun 2007 22:16:19 +0200, arno wrote:
>
>> Hi,
>>
>> I have been struggling with the following
>>
>> I am using vbscript in an application that will display registry keys
>> (and their values) as part of a treeview control.
>>
>> I know the 'parent key', under which there can be a varying number of
>> subkeys, and their subkeys, and so on.
>>
>> I know how to enumerate subkeys under a single key, using WMI and
>> EnumKey
>>
>> What I am srtuggling with is, that I need some mechanism to process
>> each of the found subkeys to find about their subkeys, and so on. Some
>> kind of recursive algorhythm. I have seen and tried examples of
>> recursive algorhythms, for instance for files and folders. But
>> somehow, I cannot get my brain to figure out how to translate those to
>> my needs.
>>
>> I was hoping someone could help me out, either with some sample code
>> or a website perhaps? I have so far searched pscode.com and some
>> others, but havent quite found what I am looking for.
>>
>
> Arno,
>
> this script will sniff for subkey collections and form the new-found key
> name on the fly.
>
>
http://www.tlviewer.org/EnumTypeLib.vbs.txt
>
> --
> Mark
Hi, Mark
I'm trying to use your script and having problems at about line 61, which
starts with:
if ubound(subkeys2)> 2 then wscript.echo
subkeys2 is sometimes not an array, so I get an error.
I've inserted the following lines ahead of that line:
If Not IsArray(subkeys2) Then
MsgBox "Subkeys2 is not an array for" & vbCrLf & _
Hex(hkey) & ", "& key & "\" & EnumKey(i) & "\" & subkeys1(j)
End If
I get this:
Subkeys2 is not an array for
80000000, TypeLib\{0002E157-0000-0000-C000-000000000046}\5.3
With RegEdit, I see that subkey 5.3 has no subkeys, but that most others
have at least a flags and helpdir subkeys.
Any ideas on how to fix the problem?
-Paul Randall
Is this just an oddball