>I'm trying to get an capture the network card name using WMI, the following code will return the network card names but it includes 4 entries on my workstation, and I only have one active connection which in my case is the last entry. I'm hoping someone has some experience with this.
>
You can try adding the domain to your query: (?)
loloc = createobject('WbemScripting.SWbemLocator')
lcDomain = getenv('USERDNSDOMAIN')
omgr = loloc.ConnectServer()
oNetwork = omgr.execquery("select * from Win32_NetworkAdapterConfiguration where IPEnabled='true' and DNSDomain='" + lcDomain + "'")
FOR EACH objNic IN oNetwork
? objNic.Caption
ENDFOR
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?
"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare
"To die for a religion is easier than to live it absolutely"
Jorge L. Borges