命令行配置服务启动类型

 

sc config <service name> start=<mode>
For example,

sc config tlntsvr start=auto
automatically starts the tlntsvr service when you boot the system.

The start options are

auto--a service automatically started at boot time, even if no user logs on
boot--a device driver loaded by the boot loader
demand--a service that must be manually started (the default)
disabled--a service that can‘t be started
system--a service started during kernel initialization

 

命令行开启windows ntp服务

 

sc config w32time start=auto
sc start w32time
reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer" /v Enabled /t REG_DWORD /d "1" /f

 

命令行配置服务启动类型

上一篇:漫谈可视化Prefuse(四)---被玩坏的Prefuse API


下一篇:从word中复制内容包含图片到kindeditor编辑器中