Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change start up type of a windows service using command line

My focus is on web server.

Apache web server does install service in automatic type (httpd -k install) and Apache does not provide a parameter to install service in manual type (like MySQL: mysqld --install-manual).

I read some about SC (C:\Windows\System32\sc.exe) and tried to change it with SC but I couldn't. So what's the solution?

like image 527
Mohammad Eskandari Avatar asked Jul 25 '11 13:07

Mohammad Eskandari


1 Answers

SC should be able to handle this, are you getting any errors?

This would set the startup type to manual for a service called 'apache' :

  SC \\computername CONFIG apache start= demand
like image 130
Dave Avatar answered Sep 29 '22 07:09

Dave