开发者

Start a disabled windows service?

开发者 https://www.devze.com 2022-12-28 22:34 出处:网络
How do I start a disabled windows service from com开发者_StackOverflow社区mand line? NET START \"Service\" doesn\'t work on disabled servicesopen command line(cmd.exe) and use this:

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

精彩评论

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

关注公众号