View Full Version : Get current logged-in windows user in google chrome

06-20-2012, 12:04 PM
Hello everyone, I have a question for you: I have built a web
application, until now, used it only with internet explorer. I'm now
want to make it usable in google chrome as well, but there is one
thing I can't work out yet: In my javascript code, I've used an
ActiveX object in order to fetch the current logged in windows user.
As I know, ActiveX will not work on google chrome, but my question is
if there is an alternative way in order to fetch the current user in
google chrome.
Thanks in advanced,
Tal Tchernihovski,

Old Pedant
06-21-2012, 04:17 AM
In a word, "no."

And there's no way to do it even in internet explorer if the user refuses to install your ActiveX control. Solutions that use ActiveX controls pretty much only work in inTRAnet situations, inside a company where the IT department can dictate to all users just what software they will use.

You *might* be able to get something to work in Chrome/Firefox/et al. using a *JAVA* applet (Java, not JavaScript), but you will have the same problem: If the user refuses to install your unsafe applet, you will get nothing.

Users should never install controls like these, because any control that can get the user's Windows information can also erase the hard disk, steal all content from most any place on the disk, capture keystrokes and so steal passwords, etc., etc., etc. In short, if you have users who really really really trust you, you maybe can do this. Otherwise, forget it.

rnd me
06-21-2012, 08:36 PM
you should just ask the user.
not only does that work on every browser, it means i can use the app from a guest profile or someone else's computer.

it's not like anyone can't make a window's user account using any name they want...