Windows Services

If you want to change the dependencies of a Windows Service, for example, you want your app server to start after your database then see the following links:
 
Configuring Windows services using Command Prompt - Sidharth Sehgal's blog - Site Home - MSDN Blogs
 
Sc config
 
How to add dependency on a Windows Service AFTER the service is installed - Server Fault

There are several options when changing Windows Service Configuration, however these are the most useful:

  • sc config Tomcat7 depend= Oracle12 - this makes the Tomcat7 service depend on Oracle12
  • sc config Tomcat7 depend=/ - this removes all dependencies for the Tomcat7 service
  • sc config Tomcat7 start= delayed-auto - the Tomcat7 service will start automatically but delayed
  • sc config Tomcat7 DisplayName= "Our Application" - changing the display name is handy if you want to have several Tomcat services

There is also further information on SC under Useful Commands.