As a rule, you can get all environment related information by querying static fields in Environment class. User name can be accessed by either querying Environment.UserDomainName field or Environment.UserName field.
Regards,
Moshe
Message
>From: Michael Swanson [mailto:mtscreator (AT) yahoo (DOT) com]
>Sent: Tuesday, September 12, 2006 05:03 PM
>To: CSharpNET (AT) yahoogroups (DOT) com
>Subject: [C#.NET] Finding the user name of the current loged on user
>
>Hi,
>
>I need some help finding out how I can retrieve the user name of the
>person that is currently logged onto the computer. Would anyone have
>some advice, tips, links, or directions for how I would do something
>like this?
>
>
>
>
>
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
[Non-text portions of this message have been removed]
Yahoo! Groups Links
<*To visit your group on the web, go to:
<*Your email settings:
Individual Email | Traditional
<*To change settings online go to:
(Yahoo! ID required)
<*To change settings via email:
mailto:CSharpNET-digest (AT) yahoogroups (DOT) com
mailto:CSharpNET-fullfeatured (AT) yahoogroups (DOT) com
<*To unsubscribe from this group, send an email to:
CSharpNET-unsubscribe (AT) yahoogroups (DOT) com
<*Your use of Yahoo! Groups is subject to: