Finding Logged in User / Domain using System.Security
Use the name space System.Security.Principal.WindowsPrincipalTo Identify the Domain nameSystemInformation.UserDomainName To Identify the user id Dim wp As New System.Security.Princ
ITPro Today
April 7, 2004
1 Min Read
Use the name space System.Security.Principal.WindowsPrincipal
To Identify the Domain name
SystemInformation.UserDomainName To Identify the user id Dim wp As New System.Security.Principal.WindowsPrincipal (System.Security.Principal.WindowsIdentity.GetCurrent())
MsgBox(wp.Identity.Name)
About the Author
Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.
You May Also Like