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:
00571065
Views:
39
This message has been marked as a message which has helped to the initial question of the thread.
>>>>>Is there a way via VFP to retrieve the processor ID of a user's PC?
>>>>>
>>>>>TIA
>>>>>Doug
>>>>
>>>>Not easily. Besides, even if there were, I don't think that all chips have one. The Intel chips did, but, AFAIK, the AMDs didn't. Or are you talking about the type?
>>>
>>>I want a way to uniquely identify a piece of hardware. Any ideas?
>>
>>Doug,
>>
>>You can use the MAC address of the network card (assuming it has a network card).
>
>Excuse my ignorance, but how is this done?

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 Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform