Is there a way to get the Windows username in Google Chrome using JavaScript?

I want to get the OS username with cross-browser JavaScript. I tried different solutions for this, but none actually worked. I really don't want to install a third party plugin as per my requirement I cannot do it.

This is so far I get on the internet while surfing for a solution

    var wshshell = new ActiveXObject("wscript.shell");
    var username = wshshell.ExpandEnvironmentStrings("%username%");
    alert(username);

      

+3


source to share





All Articles