Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Retrieving a PCs processor ID
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00570999
Message ID:
00571068
Vues:
34
>If the system is a Win2K, XP or NT with WMI installed, you can do the following:
>omgr = getobject("WinMgmts:")
>oadaptercol = omgr.InstancesOf("Win32_NetworkAdapterConfiguration")
>IF oadaptercol.Count > 0 then
>   * go through each adapter configured on the system
>   for each oadapter in oadaptercol
>      if type("alen(oadapter.Properties_('IPAddress').Value)") = "N" then
>         * check was done to handle WAN adpaters that are configured on the
>         * system however they don't have IP addresses so disregard them
>         ? oadapter.Properties_('MACAddress').Value
>      endif
>   endfor
>ENDIF
>return
>
>HTH.
>
>P.S. to Rick Bean - This may work on the hardware directly. I haven't tested it that far.

Larry,

This is cool. Maybe you ought to write an article about it.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform