VBScript Type Mismatch
Visual Basic
1
Posts
1
Posters
0
Views
1
Watching
-
Hi All, Can anyone tell me why I'm getting a "type mismatch" in the following code: Thanks in advance...' ****************************** Dim strgate set IPConfigSet = GetObject("winmgmts:{impersonationLevel=impersonate}").ExecQuery _ ("select IPAddress, DefaultIPGateway from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE") for each IPConfig in IPConfigSet strgate = IPConfig.DefaultIPGateway(0) next WScript.Echo strgate(0)