Enable a service from command line
Submitted by generic geek on Fri, 2005-04-08 13:45
I finally found a solution today after searching for quite awhile. I needed steps to enable a service from a command line in Windows XP. After refining my Google search to:
"enable service" -provider -pack -delivery -composition -industry -ftp -server -redhat -innovations -entry point -users -.pdf -focal +"command line" -fisheyeI finally found a link titled: "Enable Service via command line", but got a "Bad Gateway" page... I had to rely on the Google cache of the page to get the information.... Since there isn't much of a resource for how to do this, I thought I would re-post it here... To enable a service from a command line, open a command line and type the following commands:
sc config servicename start= auto net start servicenameIf you want to create a .bat file to enable a service and then start it, use the following code:
@echo off cls sc config servicename start= auto net start servicename exitWorked for me, hope you find it usefull.