Using Microsoft Edge web browser, under windows 10, how can I access the make/model and serial number of the computer that the browser is running on?
EDIT: This is currently happening, when logged into my live account I can see my make/model/serial, so it would help a project I am working on to be able to do this also.
With the latest browsers such as Chrome,Firefox,Microsoft Edge,they will automatically block such kind of requests when executing the script due to security reasons.
However,it is possible to get these hardware information using Internet Explorer since it supports ActiveX controls.ActiveX controls are Internet Explorer’s version of plug-ins.We can get these hardware information from Internet Explorer due to ActiveX controls security loopholes. Here is more information on ActiveX controls: https://www.howtogeek.com/162282/what-activex-controls-are-and-why-theyre-dangerous/
We can exploit the security vulnerabilities of ActiveX controls to make this javascript work:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title></title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET
7.1">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
<script id=clientEventHandlersJS language=javascript>
<!--
function Button1_onclick() {
var locator = new ActiveXObject ("WbemScripting.SWbemLocator");
var service = locator.ConnectServer(".");
var properties = service.ExecQuery("SELECT * FROM Win32_BaseBoard");
var e = new Enumerator (properties);
document.write("<table border=1>");
for (;!e.atEnd();e.moveNext ())
{
var p = e.item ();
document.write("<tr>");
document.write("<td>" + p.HostingBoard + "</td>");
document.write("<td>" + p.Manufacturer + "</td>");
document.write("<td>" + p.PoweredOn + "</td>");
document.write("<td>" + p.Product + "</td>");
document.write("<td>" + p.SerialNumber + "</td>");
document.write("<td>" + p.Version + "</td>");
document.write("</tr>");
}
document.write("</table>");
}
//-->
</script>
</head>
<body>
<INPUT id="Button1" type="button" value="Button"
name="Button1" language=javascript onclick="return Button1_onclick()">
</body>
</html>
You will receive a warning message from IE but you should allow blocked contents for this to work. This code will not work in any other browser,even Microsoft Edge. Here is more information:https://www.devarticles.com/c/a/JavaScript/How-to-Use-JavaScript-for-Hardware-Knowledge/1/
Hope this answer your question.