I tried to get the windows user name in IE browser only using the below code.
function GetUserName()
{
var wshell = new ActiveXObject("WScript.Shell");
alert(wshell.ExpandEnvironmentStrings("%USERNAME%"));
}
How to get the windows username in other browsers like chrome, mozilla, safari.