There’s a WService recipe on the Python cookbook:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/115875
and I’ve written a little script so far for myself which reads:
import WService
def disableService(serviceName):
ws = WService.WService(serviceName)
# print ws.infostartup()
ws.setstartup(“disabled”)
# print ws.infostartup()
disableService(“Net Logon”)
disableService(“Remote Registry”)
disableService(“Themes”)
print ‘Finished’
It is, perhaps, a lot of work just for a one-off exercise, but useful
for all those automation-junkies out there.