Is there a commandline option to modify service properties?

Viewed 69

I'm working on a script, which should switch between two services: switch one on an the other off and vice versa.

In top of that, I would like to avoid both services being started at the same time, therefore I'm thinking of modifying the properties of the service: I would like to modify the startup type from automatic to disabled and vice versa.

Is this possible and how?

1 Answers

I found the solution, using sc:

sc config Own_Server1 start=auto
sc config Own_Server2 start=disabled
Related