Setting Syncro Service to Start Automatically instead of Delayed Start

This seems like it should be easy, but for some reason doesn’t work. Command line should be

Set-Service Syncro -startupType Automatic

However when I run this it stays at Delayed start. So I tried

Net Stop Syncro
Set-Service Syncro -startupType Automatic

This too doesn’t work. Then I thought, maybe if I disable first.

Set-Service Syncro -startupType Disabled
Set-Service Syncro -startupType Automatic

The disable part works, but then trying to switch to automatic it goes back to Delayed started instead.

Anybody have a way to do this via command line? I see not reason to have it on delayed start and it just make troubleshooting after a reboot take longer. I’d like to hear community feedback.

There is a script in the library. It says starting syncro in safe mode, but also turns off delayed start so it is automatic. Might have to adjust it, I can’t remember.

The Syncro service starts delayed to give all the other services we monitor a chance to start, so use this at your own risk. Support won’t be able to resolve any issues with alerting or anything else that may arise from changing this setting.

If you send a support rep on a wild goose chase because of this service setting, you’ll own them a coffee :joy:

1 Like

If it comes down to it I’ll buy them a beer instead of coffee.

Is alerting the only reason? I’d really like to here more on this. I know a number of syncro users have said they prefer it that started without delayed start. There seems to be many more advantages to having it start sooner than possible disadvantages in waiting.

I tried that script and it might have enabled safe mode but it didn’t affect delayed start.


If this works, this is what mine looks like. (I pasted in a screenshot)

I can see support’s point on this, especially with endpoints still using hard drives.

I get the point of this, by why couldn’t Syncro reconfigure the agent to account for this. That way, it’s still checking in as soon as the system boots up, certain things will work immediately, while the stuff that need to make sure services are running are delayed by a few minutes.

Not to be contradictory, but Windows Services have a fairly capable dependency and trigger-start system built right in that the Syncro service does not use
8RLRHlx1

If the Syncro Service is not starting as “automatic” because it depends on some other service, like WMI or CIM for monitoring or something, then that would be better fixed by actually setting the proper dependency up. This way it could be “auto” start without delayed and still have all of the necessary services online.

If the reasoning is just about services you might be monitoring having time to start before checking the services, there are event logs I would recommend instead. Start the Syncro Service, and then you could do ahead and check the service - if it is already up, excellent! Go ahead and send back a “The service is up” health check. However, if the service is down, the Syncro service could just wait a grace-period (Essentially the same delayed start period, just this way the agent is online and waiting instead of offline) and if the service is STILL coming back as down, then send the failed health check.

You could even call the status “Waiting for service start” or something, and not raise the alert on that.
You might even be able to leverage Service Triggers so that it could detect something like “Service CustomWebServer Failed to start” and send up a health check status proactively, rather than waiting
Service Trigger Events - Win32 apps | Microsoft Docs

Set-Service $service -StartupType AutomaticDelayedStart is available in Set-Service in PowerShell 7 but not in Windows PowerShell 5.1.

You might be able to do something with the a Win32_Service CIM/WMI Instance, but at a quick glance it didn’t look fun. Looks like there might be a property for DelayedAutoStart but it says it’s Read only. Maybe it gets put in the Security Descriptor? In a format like this SERVICE_DELAYED_AUTO_START_INFO - I’m wildly guessing at that point though.

The easiest way would probably be to get away with setting it to Automatic and manually setting the DelayedAutostart and the AutoStartDelay in the registry. (I believe the default delay is approximate 2 minutes after the last ‘Automatic’ service has started, but I can’t find proper Microsoft Documentation)

Note: Everything under HKLM\SYSTEM\CurrentControlSet is adjusting the service STARTUP configuration, but not calling the backend APIs but not calling it to adjust the setting in the live instance. Functionally, this means any of the changes under this area will require a reboot before the updated setting applies

#Windows PowerShell 5.1
$Service = 'Syncro'

#Enable default Automatic Start
Get-Service $service | Set-Service -StartType Automatic
#Enable Delayed Auto Start. 1 = Delayed; 0 = Not Delayed
New-ItemProperty Registry::HKLM\SYSTEM\CurrentControlSet\Services\$Service -Name delayedAutostart -Value 1  -PropertyType DWORD -Force

#Set Custom delay time for this service, in Seconds 
New-ItemProperty Registry::HKLM\SYSTEM\CurrentControlSet\Services\$service -Name AutoStartDelay -Value 15 -PropertyType DWORD -Force
#Set Default AutoStartDelay for ALL Delayed Start services 
#New-ItemProperty Registry::HKLM\SYSTEM\CurrentcontrolSet\control -Name AutoStartDelay -Value 15 -PropertyType DWORD -Force

#REMOVE Automatic (Delayed) start from a service.
#Note: This is Removing the service STARTUP configuration, but not calling the backend APIs - this will require a reboot before the updated setting applies
New-ItemProperty Registry::HKLM\SYSTEM\CurrentControlSet\Services\$Service -Name delayedAutostart -Value 0  -PropertyType DWORD -Force -WhatIf
#or 
Remove-ItemProperty Registry::HKLM\SYSTEM\CurrentControlSet\Services\$Service -Name delayedAutostart   -WhatIf

By the way - this not working as you might expect would be a PowerShell bug… or maybe feature…
Long story short, if you want to try to change it - you will probably have to head to the PowerShell Github or possibly Microsoft Support and submit an issue.

Set-Service Syncro -startupType Disabled
Set-Service Syncro -startupType Automatic

If that is what you want to do, good luck, as it has been left out in production this way for so long that the PowerShell team might add a parameter for it to support configuring the delay (Often just in PowerShell CORE/6+ / not Windows PowerShell/5.1) but it most likely will still not work the way you are thinking by default where Set-Service -StartType Automatic clears any AutoStartDelay, because there might be some production scripts that rely on this Disable/Enable behavior NOT clearing the delayed start .