Does anyone know how to access Win2000 Login Info from VB.net?
Printable View
Does anyone know how to access Win2000 Login Info from VB.net?
What you mean by Login Info? you mean the current user?
VB Code:
Dim id As Security.Principal.WindowsIdentity = Security.Principal.WindowsIdentity.GetCurrent MessageBox.Show(id.Name)
Environment.UserName() will give you their login name.
Lunatic3's , shows ComputerName\Logged User .
Yours shows Logged User .
both are fine . Just consider how this became so simple in .NET:)