SyntaxFix
Write A Post
Hire A Developer
Questions
Use System.Windows.Forms.SystemInformation.UserName for the actually logged in user as Environment.UserName still returns the account being used by the current process.
System.Windows.Forms.SystemInformation.UserName
Environment.UserName