Is there any way to enable and disable a windows service using batch files.
I am talking of changing the startup type of the services i.e. enabling and disabling and not starting and stopping using Net Start and Net Stop commands.
Is there any way to enable and disable a windows service using batch files.
Share
This command has a number of functions but one is to determine the status of a service at system startup. A service can be set to run automatically, manually or not at all. The commands are
Here ServiceName is the name of the service and flag has one of the values auto, demand. or disabled . For example, to set a service to run manually the command is
Note that there must be a space after the equals sign. The correct value for the parameter ServiceName may not always be obvious and the next command can be used to find it for all services.