none
Adjusting the Autostart (Delayed) start time RRS feed

  • Question

  • I am trying to increase the delay for some of my services on a Windows Server 2012 Standard Edition system. I have changed the services from "Autostart" to "Autostart (Delayed)" and now see that my services are starting after the other AutoStart services. It is hard to accurately time the delay, but it seems to agree with the documentation that 120 seconds after the last autostart service starts.

    However, I would like to start some services after a service has collected data from a serial comms line, which takes 180 seconds on this large installation I am working on. I have read about a registry setting HKLM\SYSTEM\CurrentControlSet\Control\AutoStartDelay which is described as doing what I would like it to do, however my attempts to set the delay to 600 seconds instead of 120 seems not to make any difference to the delay time. I have tried creating the AutoStartDelay entry as both a REG_SZ and a REG_DWORD as the Internet opinion seems divided on this issue. I use 600 as a test, I would like to use a more reasonable 240 in practise.

    Has any one had experience of using this facility in Windows Server 2012? (Not R2!)

    Friday, April 8, 2016 6:42 AM

Answers

All replies

  • Hi Cheeseborough

    I have not tired this but you could always use a scheduled task if this method fails completely.

    You can use a script to net start the service and use triggers to ensure it starts a set time after the computer starts or after you log on.

    if your other service writes an event log on completion you can even schedule the task immediately after that log is written

    Have a look here

    https://technet.microsoft.com/en-us/library/cc748993.aspx?f=255&MSPPError=-2147217396

    Hope that helps

    Yours

    Ed

    Please mark as an answer if it was helpful


    Friday, April 8, 2016 7:14 AM
  • Hi Cheeseborough,

    Please check the following location:

    With regedit, look into the registry key of the service.

    When the startup type of the service is set to "Automatic (Delayed start)", the value of DelayedAutostart is set to 1

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

    To increase the default delay of 120 seconds, right click the registry key and add new key AutoStartDelay (DWORD (32-bit)     

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

    Its value can be set to decimal 240 for example.

    Note: please backup the registry before modify, in case of data lose.

    Best regards,


    Andy_Pan


    Friday, April 8, 2016 9:30 AM
    Moderator
  • I've been able to get HKLM\SYSTEM\CurrentControlSet\Control\AutoStartDelay to work as a REG_DWORD, but using a value that's a number of milliseconds instead of seconds (i.e. decimal value of 600000 instead of 600).
    Friday, September 2, 2016 3:37 PM