NT user name

Retrieve the NT user name on an intranet. Strips the domain name from the returned string.

Submitted by ANON

Code:

<%
MyVar=request.servervariables("logon_user")
MyPos = InstrRev(MyVar, "/", -1, 1)
UserName=Mid(MyVar,MyPos+1,Len(MyVar))
%>

 

Sponsors