none
How to set service's startup type to "Automatic (Delayed Start)" with C++ in win 8?

    Question

  • As we known, there are three windows service startup types: Automatic(Delayed Start), Automatic, Manual, Disabled; and we can control services startup type by Win32 API: ChangeServiceConfig2;

    But My question is, when I used ChangeServiceConfig2 to set services startup type in win8, it seem to be not work well; after reboot computer and logon user, It will wait 3~5min to startup my service after system logon.

    Is there any other thing I need to set?

    Monday, August 06, 2012 5:31 AM

Answers

  • Hi Igor:

    I means service delayed too much times, over 3min; it seems not to be normal.

    But I compare with win7, it also need over 3min, and when I check System Event View Message, I can see my service start with system services which are set to delay startup.

    So, Maybe this delay startup phenomenon is normal.

    Thank you, Igor.

    • Marked as answer by Leonard.Lau Wednesday, August 08, 2012 6:10 AM
    Tuesday, August 07, 2012 2:01 AM

All replies

  • Leonard.Lau wrote:

    As we known, there are three windows service startup types:  Automatic(Delayed Start), Automatic, Manual, Disabled; and we can
    control services startup type by Win32 API: ChangeServiceConfig2;

    But My question is, when I used ChangeServiceConfig2 to set services  startup type in win8, it seem to be not work well; after
    reboot computer and logon user, It will wait 3~5min to startup my  service after system logon.

    Sounds like Delayed Start working as intended. The service started, and  its start-up was indeed delayed. What seems to be the problem?


    Igor Tandetnik

    Monday, August 06, 2012 12:33 PM
  • Hi Igor:

    I means service delayed too much times, over 3min; it seems not to be normal.

    But I compare with win7, it also need over 3min, and when I check System Event View Message, I can see my service start with system services which are set to delay startup.

    So, Maybe this delay startup phenomenon is normal.

    Thank you, Igor.

    • Marked as answer by Leonard.Lau Wednesday, August 08, 2012 6:10 AM
    Tuesday, August 07, 2012 2:01 AM