Getting a Windows credentials username in c# windows form application
Asked Answered
M

1

9

How do I get the currently signed in username in a windows forms application? The app runs on Windows Embedded Standard 7 O/S.

Melicent answered 20/12, 2012 at 20:2 Comment(0)
C
27

You probably want Environment.UserName. See http://msdn.microsoft.com/en-us/library/system.environment.username.aspx for details.

Clasping answered 20/12, 2012 at 20:5 Comment(1)
For those looking for domain\user, this can be supplemented with Environment.UserDomainName.Elastin

© 2022 - 2024 — McMap. All rights reserved.