Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to reliably get the computer's on-board network adapter's MAC address?
    primarykey
    data
    text
    <p>I am trying to (more or less) uniquely identify a system for licensing purposes. I have chosen the computer's on-board network adapter's MAC address for this task, since I can be sure that every cmputer running this software actually has one, and this avoids re-activation when changing e.g. the harddrive.</p> <p>I am having troubles reliably identifying the onboard network adapter, though. </p> <p>Using the "Win32_NetworkAdapterConfiguration" ManagementClass, I can get a whole lot of MAC Addresses, including the address I like, but I have not found a way to distinguish the onboard one from virtual adapters installed by Windows or Virus Scanners. This list seems to be ordered, though. The MAC Address I am interested in is (on my machine) listed before other (real) network adapters. (The list is ordered by interface index.)</p> <p>Using <code>NetworkInterface.GetAllNetworkInterfaces()</code>, I think I can identify the real network adapters by filtering on <code>.NetworkInterfaceType == NetworkInterfaceType.Ethernet</code>, but this list seems to be unordered (an added network card appears before the onboards one).</p> <p>Is first using the second method to get a list of real networks cards and then sorting them by the order of appearence in the first list a reliable way of identifying the MAC address I am looking for? Can the interface index in the first list change? I'd be happy to hear your thoughts!</p> <p>Thanks!</p> <p>P.S.: I know that the MAC address can be rather easily changed, but I can live with that. I cannot live with the customer not being able to use the software after simply inserting a WLAN stick =)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload