title: C#: Load roaming profile and execute program as user
body: <p>In an application I need to execute other programs with another user's credentials. Currently I use <strong><a href="http://msdn.microsoft.com/en-us/library/ed04yy3t.aspx" rel="nofollow noreferrer">System.Diagnostics.Process.Start</a></strong> to execute the program:</p>
  
  <pre><code>public static Process Start(
     string fileName,
     string arguments,
     string userName,
     SecureString password,
     string domain
  )
  </code></pre>
  
  <p>However this function does not load the roaming profile from the net - which is required.</p>
  
  <p>I could use "runas /profile ..." to load the profile and execute the command, but that would ask for a password. There must be an more elegant way...</p>
  
  <p>But where?</p>