“自动"vs“自动(延迟启动)" [英] "Automatic" vs "Automatic (Delayed start)"

查看:83
本文介绍了“自动"vs“自动(延迟启动)"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

安装 Windows 服务时,有两个选项可用于在 Windows 启动时自动启动 Windows 服务.一种是自动,另一种是自动(延迟启动).这两者具体有什么区别?

When installing Windows services there are two options for automatically starting a Windows service on Windows startup. One is Automatic, and the other is Automatic (Delayed start). What is the difference between these two in detail?

例如,如果您使用 wixtoolset 创建安装程序,则 ServiceConfig 元素具有 DelayedAutoStart 属性.这将如何影响在启动时启动服务时会发生什么?

For example, if you're creating the installer with wixtoolset, the ServiceConfig element has the DelayedAutoStart attribute. How will that effect what happens when services are started at boot time?

WiX 文档:ServiceConfig 元素

WiX documentation: ServiceConfig Element

推荐答案

简而言之,设置为自动的服务会在开机过程中启动,而设置为延迟启动的服务em> 将在启动后不久启动.

In short, services set to Automatic will start during the boot process, while services set to start as Delayed will start shortly after boot.

启动您的服务延迟可提高您的服务器的启动性能并具有 文章 Adriano链接到评论中.

Starting your service Delayed improves the boot performance of your server and has security benefits which are outlined in the article Adriano linked to in the comments.

更新:开机后不久"实际上是在最后一次自动"之后的 2 分钟.默认情况下,服务已启动.这可以通过注册表项进行配置,根据 Windows Internals 和其他来源(3,4).

Update: "shortly after boot" is actually 2 minutes after the last "automatic" service has started, by default. This can be configured by a registry key, according to Windows Internals and other sources (3,4).

感兴趣的注册表项(至少在某些版本的 Windows 中)是:

The registry keys of interest (At least in some versions of windows) are:

  • HKLMSYSTEMCurrentControlSetservices<service name>DelayedAutostart 如果延迟,则值为 1,否则为 0.
  • HKLMSYSTEMCurrentControlSetservicesAutoStartDelayHKLMSYSTEMCurrentControlSetControlAutoStartDelay(在 Windows 10 上):(DWORD) 十进制毫秒数等等,可能需要创建这个.全局应用于所有延迟服务.
  • HKLMSYSTEMCurrentControlSetservices<service name>DelayedAutostart will have the value 1 if delayed, 0 if not.
  • HKLMSYSTEMCurrentControlSetservicesAutoStartDelay or HKLMSYSTEMCurrentControlSetControlAutoStartDelay (on Windows 10): (DWORD) decimal number of milliseconds to wait, may need to create this one. Applies globally to all Delayed services.

这篇关于“自动"vs“自动(延迟启动)"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆