I am writing a VB Script that uses WMI to determine which adapter is used for internet connectivity? For example – if I have a LAN and a 3G board it needs to tell the user which is connected. I understand that a machine might have >1 internet connection, but for now, let’s assume 1.
edit:
Ok, how can I do this using any command tool? Given the roaring silence, I guess this is not do-able using WMI. 🙂 Would trace print work? I’m not too familiar with trace.
Thanks in advance for any help!
Rich
Using Win32_NetworkAdapterConfiguration find the network device that has the lowest IPConnectionMetric, this will be the first device used for internet access.
VBScript examples for accessing the WMI can be found on MSDN