title: ServiceBase service error 193:0xc1 on Windows XP
body: <p>I have a service that I've built using the C# ServiceBase class. It works when I run it in Windows 7 and Windows Server 2008; however, it doesn't work on Windows XP.</p>
  
  <p><img src="https://i.stack.imgur.com/TOAez.png" alt="enter image description here"></p>
  
  <p>I created the service using <code>sc create PBUService binpath= "C:\PBULogger.exe"</code>. This is the correct path.</p>
  
  <p>Nothing is logging in the Event Viewer under anything and my exception handling code doesn't fire either.</p>
  
  <p>I thought maybe I didn't have the correct .NET version installed, but I have 4.0 installed on the XP machine. However, I created this project using Visual Studio Express 2012, which I'm pretty sure uses .NET 4.5 by default. Is this causing an issue? All the classes I'm using are version 4.0.</p>
  
  <p>I have stripped down all my code to the base methods and this still doesn't work.  Here is my code:</p>
  
  <pre><code>namespace PBULogger {
      class PBULoggerService : ServiceBase {
      protected override void OnStart(string[] args) {
          try {
             base.OnStart(args);
          } catch (Exception ex) {
              EmailUtility.sendEmail("Service Error", ex.Message + ex.StackTrace);
          }            
      }
  
      protected override void OnStop() {
          base.OnStop();
      }
  }
  </code></pre>
  
  <p>Since it doesn't log in the event viewer, it tells me it isn't even trying to start the service.</p>
  
  <p>I found these entries in my registry for the service under 'HKEY_LOCAL_MACHINE/System/ControlSet001/Enum/Services/PBUService/Enum'. </p>
  
  <p>Not really sure what it means.</p>
  
  <p><img src="https://i.stack.imgur.com/1YWXO.png" alt="enter image description here"></p>
  
  <p>Anybody know what's going on?</p>