Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Retrieving a PCs processor ID
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00570999
Message ID:
00571068
Views:
32
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform