title: Unable to load executable
body: <p>I'm attempting to create a service which opens an application, however I have had no luck. Thus, I downloaded the following sample code, and attempted to create a service based on it. However, it does not work either. What happens is that the code executes, however the executable is never called (in the following case, the calculator is not opened). </p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.ComponentModel;
  using System.Data;
  using System.Diagnostics;
  using System.Linq;
  using System.ServiceProcess;
  using System.Text;
  using System.Threading.Tasks;
  
  namespace Open_Calculator
  {
      public partial class Service1 : ServiceBase
      {
          public static Process process;
          public Service1()
          {
              //InitializeComponent();
              string[] args = { "1", "2" };
              OnStart(args);
          }
          protected override void OnStart(string[] args)
          {
              start_calc();
          }
          protected override void OnStop()
          {
          }
          static protected void start_calc()
          {
              process = new Process();
              process.StartInfo.FileName = @"C:\Windows\system32\calc.exe";
              process.StartInfo.CreateNoWindow = true;
              process.StartInfo.ErrorDialog = false;
              process.StartInfo.RedirectStandardError = true;
              process.StartInfo.RedirectStandardInput = true;
              process.StartInfo.RedirectStandardOutput = true;
              process.StartInfo.UseShellExecute = false;
              process.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
              process.Start();
          }
      }
  }
  </code></pre>
  
  <p>The same exact code copy-pasted in a console application works.</p>
  
  <p>The service is set to interact with the desktop, and it is set to run as "LocalSystem".</p>
  
  <p>The account running the service does have access to <code>C:\Windows\System32</code> as I tested it. Process.Start() does not return any errors, and calc is not running in the background (checked through task manager)</p>