I know that we can get the MAC address of a user via IE (ActiveX objects).
Is there a way to obtain a user\'s MAC address using JavaScript?
i was looking for the same problem and stumbled upon the following code.
How to get Client MAC address(Web):
To get the client MAC address only way we can rely on JavaScript and Active X control of Microsoft.It is only work in IE if Active X enable for IE. As the ActiveXObject is not available with the Firefox, its not working with the firefox and is working fine in IE.
This script is for IE only:
function showMacAddress() {
var obj = new ActiveXObject("WbemScripting.SWbemLocator");
var s = obj.ConnectServer(".");
var properties = s.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration");
var e = new Enumerator(properties);
var output;
output = '';
output = output + 'Caption MACAddress ';
while (!e.atEnd()) {
e.moveNext();
var p = e.item();
if (!p) continue;
output = output + '';
output = output + '' + p.Caption; +' ';
output = output + '' + p.MACAddress + ' ';
output = output + ' ';
}
output = output + '
';
document.getElementById("box").innerHTML = output;
}
showMacAddress();