title: Windows service w/ process.start username, password and domain
body: <p>I'm trying to create a windows service in which a process should start. This process needs to be logged into another account.</p>
  
  <pre><code>    protected override void OnStart(string[] args)
          {
              _thread.Start();
          }
  
      private void ThreadFunction()
      {
          var process = new Process
                            {
                                    StartInfo =
                                        {
                                            UserName = "User",
                                            Password = "Pass",
                                            UseShellExecute = false,
                                            FileName = @"C:\Program Files\Default Company Name\ServiceProcessInstaller\ConsoleProcess.exe"
                                        }
                                };
          process.Start();
      }
  </code></pre>
  
  <p>I thought this to be rather simple, but it seems like process.start and windows service are like oil and water. </p>
  
  <p>When I start the process nothing happens and eventually an exception i given:
  Windows could not start the "AServiceProcess" service on Local Computer.
  Error 1067: The process terminated unexpectedly.</p>
  
  <p>I would really appreciate all the help I can get and if anything isn't clear enough let me know. </p>