Discussion:
service delayed start question
(too old to reply)
T
2017-08-07 06:05:12 UTC
Permalink
Raw Message
Hi All,

I fixed an issue a guy had by changing a service that
started at boot to "delayed start". Seems too
much other junk was happening at the same time.

He does not need the service to run for about 10
hours after he reboots and those that call on the service
bitch if I set the service to "manual".

Question: "services" did not give me the option
of saying how long I wanted the delay. Is there
a way to do this in the registry?

Many thanks,
-T
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Serious error.
All shortcuts have disappeared.
Screen. Mind. Both are blank.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
VanguardLH
2017-08-07 06:32:18 UTC
Permalink
Raw Message
Post by T
I fixed an issue a guy had by changing a service that
started at boot to "delayed start". Seems too
much other junk was happening at the same time.
He does not need the service to run for about 10
hours after he reboots and those that call on the service
bitch if I set the service to "manual".
Question: "services" did not give me the option
of saying how long I wanted the delay. Is there
a way to do this in the registry?
Why not use Task Scheduler? Have it run the 'sc.exe' command to start
or stop services. You'll need to get the service name. One way is to
run 'sc.exe query'. You want the SERVICE_NAME value (string).

Better check if the service has any dependencies. Run 'services.exe',
select the service, and look at the Dependencies tab. Those services
have to be loaded AND ready before you can load a dependent service.
T
2017-08-07 06:49:59 UTC
Permalink
Raw Message
Post by VanguardLH
Post by T
I fixed an issue a guy had by changing a service that
started at boot to "delayed start". Seems too
much other junk was happening at the same time.
He does not need the service to run for about 10
hours after he reboots and those that call on the service
bitch if I set the service to "manual".
Question: "services" did not give me the option
of saying how long I wanted the delay. Is there
a way to do this in the registry?
Why not use Task Scheduler? Have it run the 'sc.exe' command to start
or stop services. You'll need to get the service name. One way is to
run 'sc.exe query'. You want the SERVICE_NAME value (string).
That is an idea. Thank you!
Post by VanguardLH
Better check if the service has any dependencies. Run 'services.exe',
select the service, and look at the Dependencies tab. Those services
have to be loaded AND ready before you can load a dependent service.
I did that. There are no dependencies.

Do you know how to delay it in the registry?

-T
Rene Lamontagne
2017-08-07 13:59:57 UTC
Permalink
Raw Message
Post by T
Post by VanguardLH
Post by T
I fixed an issue a guy had by changing a service that
started at boot to "delayed start". Seems too
much other junk was happening at the same time.
He does not need the service to run for about 10
hours after he reboots and those that call on the service
bitch if I set the service to "manual".
Question: "services" did not give me the option
of saying how long I wanted the delay. Is there
a way to do this in the registry?
Why not use Task Scheduler? Have it run the 'sc.exe' command to start
or stop services. You'll need to get the service name. One way is to
run 'sc.exe query'. You want the SERVICE_NAME value (string).
That is an idea. Thank you!
Post by VanguardLH
Better check if the service has any dependencies. Run 'services.exe',
select the service, and look at the Dependencies tab. Those services
have to be loaded AND ready before you can load a dependent service.
I did that. There are no dependencies.
Do you know how to delay it in the registry?
-T
You might try Startupdelayer at
http://www.r2.com.au/page/products/show/startup-delayer/
I have used it a few times when 2 scanners started together and one
killed the other.HTH

Rene
T
2017-08-07 17:05:33 UTC
Permalink
Raw Message
Post by Rene Lamontagne
Post by T
Post by VanguardLH
Post by T
I fixed an issue a guy had by changing a service that
started at boot to "delayed start". Seems too
much other junk was happening at the same time.
He does not need the service to run for about 10
hours after he reboots and those that call on the service
bitch if I set the service to "manual".
Question: "services" did not give me the option
of saying how long I wanted the delay. Is there
a way to do this in the registry?
Why not use Task Scheduler? Have it run the 'sc.exe' command to start
or stop services. You'll need to get the service name. One way is to
run 'sc.exe query'. You want the SERVICE_NAME value (string).
That is an idea. Thank you!
Post by VanguardLH
Better check if the service has any dependencies. Run 'services.exe',
select the service, and look at the Dependencies tab. Those services
have to be loaded AND ready before you can load a dependent service.
I did that. There are no dependencies.
Do you know how to delay it in the registry?
-T
You might try Startupdelayer at
http://www.r2.com.au/page/products/show/startup-delayer/
I have used it a few times when 2 scanners started together and one
killed the other.HTH
Rene
That looks sweet. Thank you!
Rene Lamontagne
2017-08-07 18:08:45 UTC
Permalink
Raw Message
Post by T
Post by Rene Lamontagne
Post by T
Post by VanguardLH
Post by T
I fixed an issue a guy had by changing a service that
started at boot to "delayed start". Seems too
much other junk was happening at the same time.
He does not need the service to run for about 10
hours after he reboots and those that call on the service
bitch if I set the service to "manual".
Question: "services" did not give me the option
of saying how long I wanted the delay. Is there
a way to do this in the registry?
Why not use Task Scheduler? Have it run the 'sc.exe' command to start
or stop services. You'll need to get the service name. One way is to
run 'sc.exe query'. You want the SERVICE_NAME value (string).
That is an idea. Thank you!
Post by VanguardLH
Better check if the service has any dependencies. Run 'services.exe',
select the service, and look at the Dependencies tab. Those services
have to be loaded AND ready before you can load a dependent service.
I did that. There are no dependencies.
Do you know how to delay it in the registry?
-T
You might try Startupdelayer at
http://www.r2.com.au/page/products/show/startup-delayer/
I have used it a few times when 2 scanners started together and one
killed the other.HTH
Rene
That looks sweet. Thank you!
Most welcome.

Rene
VanguardLH
2017-08-07 18:00:56 UTC
Permalink
Raw Message
Post by T
Post by VanguardLH
I fixed an issue a guy had by changing a service that started at
boot to "delayed start". Seems too much other junk was happening
at the same time.
He does not need the service to run for about 10 hours after he
reboots and those that call on the service bitch if I set the
service to "manual".
Question: "services" did not give me the option of saying how long
I wanted the delay. Is there a way to do this in the registry?
Why not use Task Scheduler? Have it run the 'sc.exe' command to start
or stop services. You'll need to get the service name. One way is to
run 'sc.exe query'. You want the SERVICE_NAME value (string).
That is an idea. Thank you!
Post by VanguardLH
Better check if the service has any dependencies. Run 'services.exe',
select the service, and look at the Dependencies tab. Those services
have to be loaded AND ready before you can load a dependent service.
I did that. There are no dependencies.
Do you know how to delay it in the registry?
Don't understand what you are asking. Task Scheduler can delay a
program at several increments. Not knowing under what conditions your
user wants to initiate when to start timing when to start a service, and
assuming it is timed from when they choose to login, you can create a
scheduled task that initiates on login but is delayed up to 30 seconds,
1 minute, 30 minutes, 1 hour, 8 hours, 1 day. Although you said the
user wanted to delay startup by 10 hours, 8 hours seems close enough.

If you meant setting a service's definition for Delayed Start and then
defining how long is the delay, I've never bothered to look into that.
From a quick search, looks like Delayed Start happens 2 minutes after
the last Automatic service has been requested to start (just the request
to start the service, not when it is ready). Dependencies have to be
taken care of, too, so the chain will effect the service load order.

http://windowsitpro.com/systems-management/q-how-can-i-set-service-automatic-delayed-start-command-line

In another article, someone claimed the following defines the delay
enable and delay time:

Key: HKLM\SYSTEM\CurrentControlSet\services\<servicename>
Data name: DelayedAutostart (0 = disabled, 1 = enabled)
Data name (DWORD 32bit): AutoStartDelay (in [milli]seconds)

My guess is the delay is measured after the last request for Automatic
startup (i.e., all dependencies met before submit the automatic start
request to a service). Delayed Start is supposed to start after the
last Automatic started service. I'd have to do more research to
determine the data type for the DelayedAutostart item and if
AutoStartDelay is measured in seconds or milliseconds. I'll let you do
that.
T
2017-08-07 18:10:48 UTC
Permalink
Raw Message
Post by VanguardLH
AutoStartDelay (in [milli]seconds)
That is it, but there is only one reference I could
find for milliseconds. Every other reference is
for seconds.
T
2017-08-07 18:09:24 UTC
Permalink
Raw Message
Post by T
Hi All,
I fixed an issue a guy had by changing a service that
started at boot to "delayed start". Seems too
much other junk was happening at the same time.
He does not need the service to run for about 10
hours after he reboots and those that call on the service
bitch if I set the service to "manual".
Question: "services" did not give me the option
of saying how long I wanted the delay. Is there
a way to do this in the registry?
Many thanks,
-T
I think I have found it. BUTTTTTTT I can not tell if
the number is seconds or milliseconds:

This is what I have so far:

Automatic (Delayed start): adjust delay:

Reference:
https://social.technet.microsoft.com/Forums/windows/en-US/d8f0e315-74d4-4890-a62f-ef427a8532e1/adjusting-the-autostart-delayed-start-time?forum=winservergen


HKLM\SYSTEM\CurrentControlSet\services\<service name>\DelayedAutostart
"Automatic (Delayed start)" = 1


The default delay is 120000 milliseconds

To adjust the delay, create 32 bit DWORD called "AutoStartDelay"

HKLM\SYSTEM\CurrentControlSet\services\<service name>\AutoStartDelay

Populate with milliseconds
JJ
2017-08-07 18:49:51 UTC
Permalink
Raw Message
Post by T
I think I have found it. BUTTTTTTT I can not tell if
https://social.technet.microsoft.com/Forums/windows/en-US/d8f0e315-74d4-4890-a62f-ef427a8532e1/adjusting-the-autostart-delayed-start-time?forum=winservergen
HKLM\SYSTEM\CurrentControlSet\services\<service name>\DelayedAutostart
"Automatic (Delayed start)" = 1
The default delay is 120000 milliseconds
To adjust the delay, create 32 bit DWORD called "AutoStartDelay"
HKLM\SYSTEM\CurrentControlSet\services\<service name>\AutoStartDelay
Populate with milliseconds
Nice find. :)
T
2017-08-07 18:58:59 UTC
Permalink
Raw Message
Post by JJ
Post by T
I think I have found it. BUTTTTTTT I can not tell if
https://social.technet.microsoft.com/Forums/windows/en-US/d8f0e315-74d4-4890-a62f-ef427a8532e1/adjusting-the-autostart-delayed-start-time?forum=winservergen
HKLM\SYSTEM\CurrentControlSet\services\<service name>\DelayedAutostart
"Automatic (Delayed start)" = 1
The default delay is 120000 milliseconds
To adjust the delay, create 32 bit DWORD called "AutoStartDelay"
HKLM\SYSTEM\CurrentControlSet\services\<service name>\AutoStartDelay
Populate with milliseconds
Nice find. :)
Still trying to figure out if it is seconds or milliseconds
T
2017-08-07 20:59:10 UTC
Permalink
Raw Message
Post by T
Post by JJ
Post by T
I think I have found it. BUTTTTTTT I can not tell if
https://social.technet.microsoft.com/Forums/windows/en-US/d8f0e315-74d4-4890-a62f-ef427a8532e1/adjusting-the-autostart-delayed-start-time?forum=winservergen
HKLM\SYSTEM\CurrentControlSet\services\<service name>\DelayedAutostart
"Automatic (Delayed start)" = 1
The default delay is 120000 milliseconds
To adjust the delay, create 32 bit DWORD called "AutoStartDelay"
HKLM\SYSTEM\CurrentControlSet\services\<service name>\AutoStartDelay
Populate with milliseconds
Nice find. :)
Still trying to figure out if it is seconds or milliseconds
I set one up for 300000 and it was started after about 10 minutes
(I wasn't looking). So I presume it is milliseconds
JJ
2017-08-09 15:27:21 UTC
Permalink
Raw Message
Post by T
I set one up for 300000 and it was started after about 10 minutes
(I wasn't looking). So I presume it is milliseconds
Thanks for clarifying that.

JJ
2017-08-07 18:37:49 UTC
Permalink
Raw Message
Post by T
Hi All,
I fixed an issue a guy had by changing a service that
started at boot to "delayed start". Seems too
much other junk was happening at the same time.
He does not need the service to run for about 10
hours after he reboots and those that call on the service
bitch if I set the service to "manual".
Question: "services" did not give me the option
of saying how long I wanted the delay. Is there
a way to do this in the registry?
Many thanks,
-T
The delay is not actually a delay. It's more like queued. So, it's not
configurable.

All Delayed-Start services start only after all Auto-Start services have
finished their startup tasks. Also, the Delayed-Start services' startup
tasks are set to the lowest CPU priority.

<https://blogs.technet.microsoft.com/askperf/2008/02/02/ws2008-startup-processes-and-delayed-automatic-start/>
Loading...