[thelist] ASP Question - Querying data from NT login information

Mike King _redroom_ at yahoo.co.uk
Thu Aug 24 08:59:13 CDT 2000

Here's a little bit of code that pulls the data you need:

Dim UserObj, strServer, strDom, strFullName

strDom = "DomainName\" ' the domain name with a backslah
strServer = "CoPDC"

Set UserObj = GetObject("WinNT://" & sreServer & "/" &_
              Replace(Request.ServerVariables("LOGON_USER"), strDom, ""))
strFullName = UserObj.get("Fullname")

Set UserObj = Nothing

Response.Write "Logged in as " & strFullName

Give me a shout if you need any help.

Mike King

Get your free wombles.com email address @
e. mike.king at redroom.co.uk
t. 07971 292 999

Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie

More information about the thelist mailing list