Q:

Windows Service not starting on Windows 10 upgrade

I wrote a windows service it it works and STARTS fine in most operating systems.  I have narrowed down the fact that Windows 10 upgraded from windows 8 causes a problem where the service does not start on reboot when the service is set to automatic.
I find that start delayed does work ok.
Wondered if anyone knew of nuances between a full from scratch install and an upgrade that might point to the narrowing in on this elusive issue.
When it does not work there are no logs or events generated.  It does not seem to try and fail - just not run (start).

I just came across an installation where it works fine and the OS was upgraded from Win 8.  There seems to be some dependency that is different.  The service was written against .Net Framework 4.0 x86.
The service starts manually just fine.
automatic (at boot) startup does not work.  I was about to say it fails - but that is not the case as it does not seem to even be trying.

A:

We had a similar issue with windows 10 where most .Net based services would fail on startup, but could be started later manually just fine. For some reason, services that are written in .NET take longer to start in Windows 10. By default, if a service takes longer than 30 seconds to start without responding, the service is terminated by Windows. 
I was able to change that behavior to 60 seconds in the registry. Go to:
HKLM\SYSTEM\CurrentControlSet\Control\
If it doesn't already exist, create a DWORD (32-bit) key called "ServicesPipeTimeout"(minus quotes). Set its value to 60000(in decimal). This correlates to 60 seconds in milliseconds. 
I even created a regfile to automate this:

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control]
  "ServicesPipeTimeout"=dword:0000ea60

Just paste into notepad and save as a .reg file.
This is not a delayed start, but an increase in the time given to services to respond after startup. This fixed the issue for us on multiple machines. Unfortunately, I still do not know why .NET services take so long to start that they get terminated. However, I feel this is a Microsoft bug, and not necessarily anything us users are doing wrong...

