Is it possible to get the machine name, or IP, or MAC address (basically client network information) from javascript running Internet Explorer?
I found the following code that seems to accomplish this:
function Button1_onclick() {
var locator = new ActiveXObject("WbemScripting.SWbemLocator");
var service = locator.ConnectServer(".");
var properties = service.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration");
var e = new Enumerator (properties);
document.write("<table border=1>");
dispHeading();
for (;!e.atEnd();e.moveNext ())
{
var p = e.item ();
document.write("<tr>");
document.write("<td>" + p.Caption + "</td>");
document.write("<td>" + p.IPFilterSecurityEnabled + "</td>");
document.write("<td>" + p.IPPortSecurityEnabled + "</td>");
document.write("<td>" + p.IPXAddress + "</td>");
document.write("<td>" + p.IPXEnabled + "</td>");
document.write("<td>" + p.IPXNetworkNumber + "</td>");
document.write("<td>" + p.MACAddress + "</td>");
document.write("<td>" + p.WINSPrimaryServer + "</td>");
document.write("<td>" + p.WINSSecondaryServer + "</td>");
document.write("</tr>");
}
document.write("</table>");
}
So it's using an ActiveX Object that seems to be installed with the OS to accomplish this. Is something similar like this possible to do from a terminal service session? To get the terminal service client network information? (Not the terminal server network information which is what the above code would do when run from a terminal service session).
I'm thinking maybe there is another Active X object available to accomplish this?