Results 1 to 4 of 4

Thread: Accessing Windows 2000 Login Info from VB.net

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2002
    Location
    Chicago
    Posts
    30

    Accessing Windows 2000 Login Info from VB.net

    Does anyone know how to access Win2000 Login Info from VB.net?

  2. #2
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    What you mean by Login Info? you mean the current user?

    VB Code:
    1. Dim id As Security.Principal.WindowsIdentity = Security.Principal.WindowsIdentity.GetCurrent
    2. MessageBox.Show(id.Name)
    'Heading for the automatic overload'
    Marillion, Brave, The Great Escape, 1994

    'How will WE stand the FIRE TOMORROW?'
    Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979

  3. #3
    Fanatic Member VBCrazyCoder's Avatar
    Join Date
    Apr 2003
    Posts
    681
    Environment.UserName() will give you their login name.

  4. #4
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Lunatic3's , shows ComputerName\Logged User .
    Yours shows Logged User .

    both are fine . Just consider how this became so simple in .NET

Posting Permissions

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



Click Here to Expand Forum to Full Width