Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jun 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Get current logged-in windows user in google chrome

    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,
    taltcher@gmail.com

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,516
    Thanks
    77
    Thanked 4,379 Times in 4,344 Posts
    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.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #3
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,346
    Thanks
    11
    Thanked 589 Times in 570 Posts
    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...
    my site (updated 13/9/26)
    BROWSER STATS [% share] (2014/5/28) IE7:0.1, IE8:5.3, IE11:8.4, IE9:3.2, IE10:3.2, FF:18.2, CH:46, SF:7.9, NON-MOUSE:32%


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •