This is a strange issue I am having with my desktop machines. When I perform a WScript.Echo on Windows 2000 clients it doubles the echo on the screen. This does not happen on any XP clients. Here is a copy of the code I have been testing with, I have narrowed it down to:
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set IPConfigSet = objWMIService.ExecQuery _
("Select * from Win32_NetworkAdapterConfiguration Where IPEnabled=TRUE")
For Each IPConfig in IPConfigSet
If Not IsNull(IPConfig.IPAddress) Then
For i=LBound(IPConfig.IPAddress) to UBound(IPConfig.IPAddress)
WScript.Echo IPConfig.IPAddress(i)
WScript.Echo "Inside"
Next
End If
Next
WScript.Echo "Outside"
On any Win2000 machine it will Echo IP; "Inside", IP, "Inside", "Outside" In that order. I have tested with a few different scripts and it seems to be doubling the out put anytime an echo is inside the For Each. Thanks for any info.
Phil
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set IPConfigSet = objWMIService.ExecQuery _
("Select * from Win32_NetworkAdapterConfiguration Where IPEnabled=TRUE")
For Each IPConfig in IPConfigSet
If Not IsNull(IPConfig.IPAddress) Then
For i=LBound(IPConfig.IPAddress) to UBound(IPConfig.IPAddress)
WScript.Echo IPConfig.IPAddress(i)
WScript.Echo "Inside"
Next
End If
Next
WScript.Echo "Outside"
On any Win2000 machine it will Echo IP; "Inside", IP, "Inside", "Outside" In that order. I have tested with a few different scripts and it seems to be doubling the out put anytime an echo is inside the For Each. Thanks for any info.
Phil