Click here to Skip to main content
15,897,334 members
Please Sign up or sign in to vote.
2.00/5 (2 votes)
See more:
how to list the username of the computer which are connect in a network?
Posted
Comments
Sergey Alexandrovich Kryukov 7-Feb-13 11:48am    
Did you try to find out? Honestly, it would not be too hard. :-)
—SA
bbirajdar 7-Feb-13 15:10pm    
Best way is to ask the operator in english instead of vb.net.. Which one will you prefer ?
ShantaShan 8-Feb-13 7:15am    
can i get the coding?
ShantaShan 8-Feb-13 7:19am    
i had try to find out but i get confuse???

You can use WMI to get all records of the type Win32_UserAccount. Please see:
http://en.wikipedia.org/wiki/Windows_Management_Instrumentation[^],
http://msdn.microsoft.com/en-us/library/windows/desktop/aa394507%28v=vs.85%29.aspx[^].

This is how to write it in C#: http://stackoverflow.com/questions/5247798/get-list-of-local-computer-usernames-in-windows[^].

For a currently logged user, use: System.Environment.UserName: http://msdn.microsoft.com/en-us/library/system.environment.username.aspx[^].

Problem solved.

—SA
 
Share this answer
 
v2
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900