Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WMI Cannot Connect?
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
WMI Cannot Connect?
Miscellaneous
Thread ID:
00645119
Message ID:
00645119
Views:
38
VFP7/SP1. Trying to enumerate the NICs on the machine with WMI. Code is busted. Can anyone tell me what's not right?
	Public oNICs
	oNetwork = CreateObject("WScript.Network")
	cHostName = oNetwork.ComputerName
	oNICs = GetObject( "winmgmts:{impersonationLevel=impersonate}!\\" + cHostName + "\root\cimv2").ExecQuery("Select * from Win32_NetworkAdapter" )
	For each oID in oNICs
		IndexNo = oID.Index
		? IndexNo
	Next
Thanks.
Next
Reply
Map
View

Click here to load this message in the networking platform