Announcement

Collapse
No announcement yet.

Service.Create ("Automatic Start (Delayed)")

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Service.Create ("Automatic Start (Delayed)")

    Was wondering if anyone ever figured out how to set a Service.Create to .. like subject line .. "Automatic Start (Delayed)"?

  • #2
    First, create the service normally with an "Automatic" start. If the operation finished successfully, you would then add a REG_DWORD value with "1" named "DelayedAutostart" to the registry key you created. The key would be typically found in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\[Service name].

    Here is a screenshot to illustrate the data you need to change / insert via Lua action:

    Click image for larger version

Name:	SCRN-2022-05-11-01.png
Views:	120
Size:	43.3 KB
ID:	308725


    Ulrich

    Comment


    • #3
      Thank you. I will test this out.

      Comment


      • #4
        Another option if you didn't want to edit the registry.
        result1 = Shell.Execute(SessionVar.Expand(_SystemFolder.."\\ cmd.exe"), "open", "/C start sc.exe config NameOfTheService start= delayed-auto", "_SystemFolder", SW_HIDE, true)

        Comment

        Working...
        X