开发者

Start a disabled windows service?

How do I start a disabled windows service from com开发者_StackOverflow社区mand line?

NET START "Service" doesn't work on disabled services


open command line(cmd.exe) and use this:

sc config "ServiceName" start= auto

Becareful, it's not start = auto or start=auto or start =auto.


You can use sc.exe utility to enable the service and optionally start it as well.

To enable a service you need to set any start option except disabled:

sc.exe config [ServiceName] start= [option]

start= {boot | system | auto | demand | disabled | delayed-auto}

Specifies the start type for the service.

boot - Specifies a device driver that is loaded by the boot loader.

system - Specifies a device driver that is started during kernel initialization.

auto - Specifies a service that automatically starts each time the computer is restarted and runs even if no one logs on to the computer.

demand - Specifies a service that must be started manually. This is the default value.

delayed-auto - Specifies a service that starts automatically a short time after other auto services are started.

Then you can manually run it by executing:

sc.exe start [ServiceName]


u can use the sc command

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/sc.mspx?mfr=true

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜