更新时间:2022-11-11 19:18:47
通过RegistryKey
编辑注册表解决,见示例:
Solved by editing the registry via RegistryKey
, see example:
<RegistryKey Root="HKLM"
Key="SYSTEM\CurrentControlSet\Services\[Service Name]"
Action="create">
<RegistryValue Type="integer" Name="Start" Value="2" />
<RegistryValue Type="integer" Name="DelayedAutostart" Value="0" />
</RegistryKey>
Note 服务在服务 GUI 中可能显示为 Automatic (Delayed Start)
.但是,重新启动后,服务 GUI 将服务启动类型显示为 Automatic
.
Note service may appear as Automatic (Delayed Start)
in Services GUI. However, after restarting, Services GUI displayed the service startup type as Automatic
.