Windows Logged-In User name in Windows Application

Hi

I have a Windows-Application written in vb.net, how do I get the windows-authenticated logged-in user id?

I'm using vs2010
alfardanAsked:
Who is Participating?
 
BuggyCoderConnect With a Mentor Commented:
Environment.UserName
0
 
Chris MillardCommented:
0
 
Chris MillardCommented:
From what I understand, the Environment.UserName doesn't work on non-domain operating systems
0
 
moon_blue69Commented:
"whoami" will return the currently logged in user -> this is from a command line. Will it help you to find a way to write your script?
0
 
alfardanAuthor Commented:
That's the answer that I wanted exactly, thank you
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.