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 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Feb 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    use current windows user account to link to specific page

    Hello all,
    I would like to know if there is anyway to find out what a user's windows user account is, and based on that, direct them to a specific page? Here's a breakdown of the scenerio: I'm building a website that will be used on our company's intranet. We will have a home page that will contain a link labeled: My Reports. We will have customized pages created for each business owner. When they click on the link, I would like for it to direct them to their personalized page based on what their windows user id is. Is there a way to do this? Javascript? ASP? HTML code to search the registry? ... All client machines will be Windows XP SP2 with IE 6 SP2. Thanks a bunch,

    --cooleddie

  • #2
    Regular Coder
    Join Date
    Aug 2004
    Location
    codegoboom@yahoo.com
    Posts
    999
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Something involving ADSI, perhaps WSH, maybe clientInformation, possibly a userData store... definately MSDN.
    *this message will self destruct in n-seconds*

  • #3
    New to the CF scene
    Join Date
    Feb 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for the reply, codegoboom. My programmer bud here at work was able to acheive what we wanted with VBScript. Here's the code and note that in the link: userid = "http://home/id_" & objNet.UserName & ".htm"
    the id_" is just the prefix to the name of the pages in which the user id was concatenated, so an example of a page name would be: http://home/id_jsmith.
    you don't have to have the use that "id_" prefix to name your pages at all. it's just the scheme that we used.


    <SCRIPT language="VBScript">
    sub myreports_onclick
    Dim objNet
    dim userid
    On Error Resume Next
    Set objNet = CreateObject("WScript.NetWork")

    userid = "http://home/id_" & objNet.UserName & ".htm"
    Document.Location = userid


    Set objNet = Nothing 'Destroy the Object
    end sub
    </SCRIPT>


    hope this helps anyone who may have the same need.

  • #4
    New to the CF scene
    Join Date
    Mar 2005
    Location
    Michigan
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Capturing the Client MACHINE NAME

    I was able to successfully retrieve the user name of users on my intranet by using "User.Identity.Name". In other words strUserName = User.Identity.Name. I found a few other ways to capture the logon also, including the method you previously described.

    On to a closely-related subject, in addition to capturing the user name, I need to capture the client MACHINE NAME. I have searched and searched and I can only find how to retrieve the machine name of the server. Does anyone have an idea of how to do this? Very much appreciated!


  •  

    Posting Permissions

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