Mark,
Never got a chance to thank you - using the strip function was the ticket -
that gives me the one dimensional array that I can combine (as you did) -
or keep seperate and iterate through (as I did later in my script).
Thanks for the tip !!
Dan
Hi,
Quote:
>I am using this component (regobj.dll) to pull information from remote
>registries.
>Specifically - I am using the code below:
>const key3 =
>"\HKEY_LOCAL_MACHINE\SYSTEM\CURRENTCONTROLSET\SERVICES\LanManWorkStation\Li
n
>kage\"
>Set objReg = CreateObject("RegObj.Registry")
>Set objRemote = objReg.RemoteRegistry(servername) 'this is a variable that
>is retrieved from a text file - remote machine name
>Set lanmanbound = objRemote.RegKeyFromString(key3)
>wscript.echo("Bind is = " & lanmanbound.values("Bind").value)
>What I am trying to do is pull all of the infomration from that key (--all
>the services that are bound to the LanManWorkstation Service).
>The data in the value Bind is (I clipped out data and just dropped in etc
>(sorry for paranoia).
>\Device\NetbiosSmb
>\Device\NetBT_Tcpip_{C2216ED3-etc.}
>\Device\NetBT_Tcpip_{6BA0F80B-etc}
>\Device\NetBT_Tcpip_{29B3EAD4-etc}
>\Device\NetBT_Tcpip_{D2017149-etc}
>\Device\NetBT_Tcpip_{C48F990A-etc}
>The data actually is seperated by spaces - and that appears to be my
>problem. When I attempt to get all of this data using the code above - all
>I get back is
>Bind is = "NetbiosSmb"
>It appears to pull the data until it sees a space - damn frustrating. I
>need all of that data - any help ?
'Make an adjustment according to the RegValueType of your value:
' begin code
on error resume next
if lanmanbound.values("Bind").type = rvMultiString then
' Value is an set of STRINGs seperated by chr$(0)
dim arStr, nCount, nJ, sOut
arStr = split( lanmanbound.values("Bind").value, chr(0))
nCount = ubound(arStr)
if not err.number then
for nJ = lbound(arStr) to nCount
sOut = sOut & arStr(nJ) & vbCrLf
next
end if
WScript.echo sOut
else
' you have some other kind of value - string or binary
end if
' end code
Hope this helps,
Mark Pryor