title: ServiceInstaller.Uninstall does not stop service on Windows 10
body: <p>There is a strange behaviour.</p>
  
  <p>I have the followed code:</p>
  
  <pre><code>ServiceInstaller serviceInstaller = new ServiceInstaller();
  InstallContext installContext = new InstallContext();
  serviceInstaller.Context = installContext;
  serviceInstaller.ServiceName = strServiceName;
  serviceInstaller.Uninstall(null);
  </code></pre>
  
  <p>It's everything OK on Windows 7, but it does not work on Windows 10.</p>
  
  <p>I have to stop the service explicitly (by <code>ServiceController.Stop()</code> ), to be able to uninstall it on Windows 10.</p>
  
  <p>As described in MSDN, <code>ServiceInstaller.Uninstall ()</code> tried to stop service, but continued to work without any exception, if stopping was failed.</p>
  
  <blockquote>
    <p>Uninstall first attempts to stop the service before uninstalling it.
    If the service cannot be stopped, no exception is caught, and the
    method continues with the removal of the service.</p>
  </blockquote>
  
  <p>It there any difference on stopping of a thread in Windows 7 and Windows 10? Or maybe <code>ServiceInstaller.Uninstall ()</code> does not try to stop service on Windows 10?</p>