Hello and welcome to our community! Is this your first visit?
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
    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,

  2. #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Thanked 4,947 Times in 4,908 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.
    Be yourself. No one else is as qualified.

  3. #3
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Thanked 626 Times in 605 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...
    Create, Share, and Debug HTML pages and snippets with a cool new web app I helped create: pagedemos.com


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