0

I need to access the device MAC ID using my app in Windows 8.

I know that you can use the NetworkInformation class to get some kind of network id.

var networkProfiles = Windows.Networking.Connectivity.NetworkInformation.GetConnectionProfiles();
var adapter = networkProfiles[0].NetworkAdapter;
string networkAdapterId = adapter.NetworkAdapterId.ToString();

However this does not give me the MAC id of the device.

My question is, are these IDs unique, are they susceptible to change depending on the user hardware and how probable is such a hardware change if a user is using a tablet.

Also if there is no possible way to get a MAC id in Windows 8, is it possible to get it in Windows 8.1?

Thanks

chue x
  • 18,573
  • 7
  • 56
  • 70
Rajeev Bhatia
  • 2,974
  • 1
  • 21
  • 29
  • http://stackoverflow.com/questions/12892189/how-to-get-the-mac-address-in-winrt-windows-8-programmatically & http://stackoverflow.com/questions/16893746/udid-for-windows-8 – Farhan Ghumra Aug 14 '13 at 08:21
  • Thanks for this. I have already considered ASHWID but it is not easy to predict what part of the user's hardware might remain constant. For eg. the CPU id might not change on a tablet but may well change on a desktop! – Rajeev Bhatia Aug 14 '13 at 09:48
  • For Win 8, this has been discussed before here: [How to get the mac address in WinRT (Windows 8) programmatically?](http://stackoverflow.com/questions/12892189/how-to-get-the-mac-address-in-winrt-windows-8-programmatically) My *guess* is that Win 8.1 doesn't allow retrieval either. – chue x Aug 14 '13 at 13:34
  • Thanks for the comment..can the above NetworkAdapter ids be used in place of the MAC id as a unique identifier though? – Rajeev Bhatia Aug 14 '13 at 17:55
  • @RajeevBhatia - Sorry I have no idea as to the uniqueness of the `NetworkAdaptorId`. The docs are rather sparse on this as well. – chue x Aug 14 '13 at 18:57
  • 1
    I have used Windows.Networking.Connectivity.NetworkInformation.getConnectionProfiles()[0].networkAdapter.networkAdapterId, and my user is saying that the resulting id is the same for most of the tablets they are installing it on. - not unique. – pdschuller Jun 18 '14 at 14:44

1 Answers1

-2

ALL devices have a MAC (media access controller), they are all unique. You can find it in windows 8 or 8.1 by running the following command line ipconfig /all.

  • Hi. Thanks for that. I know how to manually fetch the MAC id of the system. Is there any way we can access this id inside the app? Thanks – Rajeev Bhatia Dec 11 '13 at 05:33