Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
WMI Cannot Connect?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
WMI Cannot Connect?
Divers
Thread ID:
00645119
Message ID:
00645119
Vues:
39
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform