title: .NET Windows Service Username
body: <p>I have a Windows Service that I created with .NET 4.5. It needs to run under the context of a Domain User Account (service account) to connect to a SQL Server using a trusted connection. In VS2013 I set the ProjectInstaller to use Account type "User." </p>
  
  <p>When I install and start the Service for the first time it prompts be for a the username and password. This is expected since I haven't stored anywhere What I find annoying is that anytime the service is stopped and started, it continues will always ask for the username and password. </p>
  
  <p>I assume (haven't been able to verify) that if service stops and is set to automatically restart, that it wouldn't be able to automatically restart because it will need the username and password. </p>
  
  <p>Is there solution to this issue, possibly adding the username and password into the installer? </p>