title: Install Windows Service Error The inner exception System.ComponentModel.Win32Exception was thrown The dependency service or group failed to start
body: <p>i developed windows service working fine in my computer when i tried install it in <code>windows server 2008 Standard 32 bit</code>  it is give me error</p>
  
  <p>The inner exception System.ComponentModel.Win32Exception was thrown with the fol lowing error message: </p>
  
  <blockquote>
    <p>The dependency service or group failed to start.</p>
  </blockquote>
  
  <p>i checks all way to install the window service, by Batch by installutill and by using installshild every time i got this error log </p>
  
  <blockquote>
    <p>Running a transacted installation.</p>
    
    <p>Beginning the Install phase of the installation. See the contents of
    the log file for the c:\Program Files\H2A\KnittingControlSer
    vice\Knitting.exe assembly's progress. The file is located at
    c:\Program Files\H2A\KnittingControlService\Knitting.Inst allLog.
    Installing assembly 'c:\Program
    Files\H2A\KnittingControlService\Knitting.exe'. Affected parameters
    are:</p>
  
  <pre><code>logtoconsole =
     logfile = c:\Program Files\H2A\KnittingControlService\Knitting.InstallLog
     "assemblypath = c:\Program Files\H2A\KnittingControlService\Knitting.exe"
  </code></pre>
    
    <p>Installing service Knitting Control Service... Service Knitting
    Control Service has been successfully installed. Creating EventLog
    source Knitting Control Service in log Application... An exception
    occurred in the OnAfterInstall event handler of System.ServiceProce
    ss.ServiceInstaller. System.InvalidOperationException: Cannot start
    service Knitting Control Service on computer '.'. The inner exception
    System.ComponentModel.Win32Exception was thrown with the fol lowing
    error message: The dependency service or group failed to start.</p>
    
    <p>An exception occurred during the Install phase.
    System.InvalidOperationException: An exception occurred in the
    OnAfterInstall ev ent handler of
    System.ServiceProcess.ServiceInstaller. The inner exception
    System.InvalidOperationException was thrown with the followi ng error
    message: Cannot start service Knitting Control Service on computer
    '.'. . The inner exception System.ComponentModel.Win32Exception was
    thrown with the fol lowing error message: The dependency service or
    group failed to start.</p>
    
    <p>The Rollback phase of the installation is beginning. See the contents
    of the log file for the c:\Program Files\H2A\KnittingControlSer
    vice\Knitting.exe assembly's progress. The file is located at
    c:\Program Files\H2A\KnittingControlService\Knitting.Inst allLog.
    Rolling back assembly 'c:\Program
    Files\H2A\KnittingControlService\Knitting.exe' . Affected parameters
    are:    logtoconsole =    logfile = c:\Program
    Files\H2A\KnittingControlService\Knitting.InstallLog    assemblypath =
    c:\Program Files\H2A\KnittingControlService\Knitting.exe Restoring
    event log to previous state for source Knitting Control Service.
    Service Knitting Control Service is being removed from the system...
    Service Knitting Control Service was successfully removed from the
    system.</p>
    
    <p>The Rollback phase completed successfully.</p>
    
    <p>The transacted install has completed. The installation failed, and the
    rollback has been performed."</p>
  </blockquote>