How to start a windows service

I created a Windows service with an automatic start type and successfully installed it on my system, but it does not start until I restart my system. Details: Yesterday I created and installed my service, and then restarted my windows so that the service starts working successfully. but the problem arose today when I load my windows and open the list of services from the "Control Panel" \ "Administration" \ "Services" window and select my service and see that it does not start automatically. What is my mistake?

+4
source share
3 answers

Assuming that the startup mode for the service is set to "Automatic" and that this state is not "Starting", then there will be at least one message stating why the service did not start in the system event log.

Typical reasons are that the service did not start fast enough (Service Controller sets time limits on how fast the services should respond to the Start message) or that the service depended on another service that was not yet available (check your service dependencies) or that your service simply failed due to a software error (for example, some resource that it does not need).

Find the error in the event log, and you will have a much better idea of ​​why your service is not already running.

+3
source

How your service worked yesterday, not today. Checking all its dependencies will be my first suggestion.

In Start-> Run, enter services.msc. This is a shortcut to open the services console.

Then right-click on your service, if it is listed there, click "Properties" in this pop-up menu.

Click the Dependency tab (fourth tab), check if your service is dependent on any other service, and that the dependency is working.

Hello,

bhupendra

+3
source

Example:

SC.exe config "ServiceName" start= auto 
0
source

All Articles