I have been trying with wmi and it works fine on win2k and xp but i suspect that wmi isent something that you can query in win 98. So how do you get the info from a win 98 machine.
Code:
Set colAdapters = objWMIService.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True")
n = 1
For Each objAdapter in colAdapters
report = report & "Network adapter info " & vbCrLf
report = report & "******************************************" & vbCrLf
report = report & "Network Card " & n & vbCrLf
report = report & "Description: " & objAdapter.Description & vbCrLf
report = report & "Physical (MAC) address: " & objAdapter.MACAddress & vbCrLf
report = report & "Comupter name: " & objAdapter.DNSHostName & vbCrLf
If Not IsNull(objAdapter.IPAddress) Then
For i = 0 To UBound(objAdapter.IPAddress)
report = report & "IP address: " & objAdapter.IPAddress(i) & vbCrLf
Next
End If
'40
If Not IsNull(objAdapter.IPSubnet) Then
For i = 0 To UBound(objAdapter.IPSubnet)
report = report & "Subnet: " & objAdapter.IPSubnet(i) & vbCrLf
Next
End If
If Not IsNull(objAdapter.DefaultIPGateway) Then
For i = 0 To UBound(objAdapter.DefaultIPGateway)
report = report & "Default gateway: " & objAdapter.DefaultIPGateway(i) & vbCrLf
Next
End If