title: Windows Service In Task Scheduler - Service cannot be started. The service process could not connect to the service controller
body: <p>I have a simple Windows Service project. I have followed instructions located at <a href="http://msdn.microsoft.com/en-us/library/zt39148a.aspx" rel="noreferrer">http://msdn.microsoft.com/en-us/library/zt39148a.aspx</a> including adding custom actions.</p>
  
  <p>When run my build in Release mode for the setup project. I run the .msi onto the server I would like for the service to run on. When I open the Services Manager, the service appears. I can even manually start the service and it runs exactly as I need it to. </p>
  
  <p>However, I would like for this service to run every 5 minutes, so I set up a task in Task Scheduler and point the .exe of my windows service to the task. However, when the task scheduler runs my windows service, I get the following error:</p>
  
  <p><strong>Service cannot be started. The service process could not connect to the service controller</strong></p>
  
  <p>I've done a lot of research on this but haven't come up with anything. Does anyone have any ideas on what might be causing this?</p>