title: how to display startup error message in windows service?
body: <p>So I wanted to create a windows service that runs a few commands in a batch file.</p>
  
  <p>However, while I assume I can redirect stdout from the subprocess and read out an error message, I can't seem to find out how I would get that to display to the screen.</p>
  
  <p>when starting a windows service, it gives errors when the service fails to start, so ideally I would like to just use the interface that pops up the other service errors rather than popping up some window of my own or writing a log file.</p>
  
  <p>I used this to get started but it doesn't seem to have anything on error processing.  </p>
  
  <p><a href="http://www.codeproject.com/Articles/499465/Simple-Windows-Service-in-Cplusplus" rel="nofollow">http://www.codeproject.com/Articles/499465/Simple-Windows-Service-in-Cplusplus</a></p>
  
  <p>He just outputs to a debugger. I can definitely do that, but ideally the person starting the service would want to know if there was an error starting.</p>