# Enable A Service With A Batch File



## goldhat (Aug 12, 2007)

hi im trying to Enable a service with a batch file not start it will give me an error if i try to 
start a disabled service is it possible even with an external or internal command


----------



## Squashman (Apr 4, 2003)

After reading this link, it looks like you have two options.
Use Regedit in your batch file or use SC from the resource kit.
http://www.nabble.com/how-to-enable-the-disable-service-in-windows-using-command-t2247103.html

sc I believe is available in XP without the resource kit.


----------



## goldhat (Aug 12, 2007)

how do i use sc command i see no command argumnt to enable a service to enable it


----------



## ghostdog74 (Dec 7, 2005)

goldhat said:


> how do i use sc command i see no command argumnt to enable a service to enable it


sc /?


----------



## Squashman (Apr 4, 2003)

Gives you an example in the link I provided. And as Ghostdog has stated, read the help.


----------



## JohnWill (Oct 19, 2002)

You could also run a registry script that would do the trick.


----------

