Paul
Fri Oct 24 06:50:23 CDT 2003
Thanks I'll try the suggestion, and yes I know the "." means this machine.
Thanks again.
"W. C. Hull"
<PleaseSubstituteMyFirstInitialMidInitialLastName51Here@hotmail.com> wrote
in message news:%W%lb.23841$Y1.3891@nwrddc03.gnilink.net...
> Paul,
>
> The "." value for strComputer mean "this machine". Replace "." with the
> remove computer name and it should work.
> If it doesn't you may need to get a copy of regobj.dll and some code found
> at
http://cwashington.netreach.net that uses this DLL.
>
> "Paul E. Surette" <Paul.Surette@lcbo.com_removethis> wrote in message
> news:OU453eXmDHA.3312@tk2msftngp13.phx.gbl...
> > Hi all,
> > The following works great on a local machine, however when I change the
> "."
> > to "Servername" The EnumKey fails. How can I enumerate on remote
> > computers?On Error Resume Next
> >
> > const HKEY_LOCAL_MACHINE = &H80000002
> > strComputer = "."
> >
> > Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &
> > strComputer & "\root\default:StdRegProv")
> >
> > strKeyPath = "SYSTEM\CurrentControlSet\Services\WMI"
> > oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
> >
> > For Each subkey In arrSubKeys
> > WScript.Echo subkey
> > Next
> > Thanks in advance.
> >
> >
>
>