title: Get current username from a program started as Local System Account
body: <p>My program is started from a service that runs under the <code>Local System Account</code> (a real user is logged in). One of the tasks of the program is store files on a network path, which should contain the current username e.g. <code>\\server\\storage\\%username%</code>, but the problem is that I get the name of the system account instead of the user account when I read the environment variable:</p>
  
  <pre><code>Environment.GetEnvironmentVariable("username");
  </code></pre>
  
  <p>Is there a way to get the correct username in this case?</p>