Is it possible to get Windows username and PCName with Javascript in browsers IE, Chrome, Firefox, Opera?
No. That sort of information is not exposed to the javascript engine in the browser.
i'd really wish this wouldn't be possible, but sadly it is (or was). i don't know for sure if this still works on Win7 and with current browser-versions, but in the past you could do this...
Internet Explorer
function getUsr() {
var wshell = new ActiveXObject("WScript.Shell");
return wshell.ExpandEnvironmentStrings("%USERNAME%");
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With