Search

Get the Computer, User and domain name using Javascript

This come quite easy, you just have to initialize an ActiveX object for "WScript.Network"
 
/* Jscript - ComputerName, Username & DoaminName */

var oWshNet = new ActiveXObject("WScript.Network");
var computerNmae = oWshNet.ComputerName;
var userName = oWshNet.UserName;
var domainName = oWshNet.UserDomain;


Note: This works only with ActiveX in IE.