title: How does a windows service behaves on Windows shutdown?
body: <p>Is there a timeout for stopping Windows Services when Windows is shutting down? I know there is a registry key "WaitToKillServiceTimeout" but does this timeout effect on services, when Windows is shutting down or is there another timeout?</p>
  
  <p>I want to find out, how long system during shutdown waits for services when it calls the OnStop method of a service.</p>
  
  <p>Can a service prevent Windows from shutting down?</p>