Remi
Wed May 26 07:52:24 CDT 2004
Now I've tried this snippet:
On Error Resume Next
const HKEY_CURRENT_USER = &H80000001
strComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")
strKeyPath = "Software\Microsoft\Internet Explorer\TypedURLs"
oReg.EnumKey HKEY_CURRENT_USER, strKeyPath, arrSubKeys
For Each subkey In arrSubKeys
WScript.Echo subkey
Next
but it still turns up empty
there are 25 typed URLs as subkeys in there...
can anyone tell me what Im missing?
Thanks
Remi
"Michael Harris (MVP)" <mikhar at mvps dot org> wrote in message
news:OYx3xdsQEHA.2452@TK2MSFTNGP11.phx.gbl...
> > I'm making a logoff script to clear my history. Before i start i want
> > to see the registry values that are there, so i write this little
> > code snippet:
> >
> > set shell = CreateObject("WScript.Shell")
> >
> > WScript.Echo
> > shell.RegRead("HKEY_CURRENT_USER\Software\Microsoft\Internet
> > Explorer\TypedURLs")
> >
> >
> > but i keep getting an error!
> >
> > Error: Unable to open registry key "the key above" for reading
> > Code: 80070002
> > Source WshShell.RegRead
> >
> > But with a reg query "HKEY_CURRENT_USER\Software\Microsoft\Internet
> > Explorer\TypedURLs" /s
> > reads the registry without any trouble...
> >
>
>
> RegRead on a key that has no default vaule set will throw that error...
>
> If you want to enumerate the named values of of a key, RegRead is the
wrong
> tool to use. Use WMI's StdRegProv and EnumValues...
>
>
> From: "Michael Harris \(MVP\)" <mikhar at mvps dot org>
> Subject: Re: Please help: Getting REGISTRY info w/ StdRegProv
> Date: Wed, 19 May 2004 19:39:28 -0700
> Message-ID: <uXSu1OhPEHA.620@TK2MSFTNGP10.phx.gbl>
> Newsgroups: microsoft.public.scripting.vbscript
>
>
http://groups.google.com/groups?selm=uXSu1OhPEHA.620%40TK2MSFTNGP10.phx.gbl&output=gplain
>
> --
> Michael Harris
> Microsoft.MVP.Scripting
> Sammamish WA US
>