a blog for those who code

Tuesday, 5 July 2016

How to solve windows could not start service on Local Computer

In this post we will be discussing about how to solve windows could not start service on local computer, Error 2 : The system cannot find the file specified. This error usually occurs when there is a mismatch in the service name and the exe file it tries to open. Wre will take an example of ASP.Net State Service (Service name : aspnet_state).

How to solve "The system cannot find the file specified"



Now whenever you encounter this type of error while starting your service, first check the path it is referencing (i.e. Path to executable) as shown below.


If you feel that the path is incorrect then you have to change the path from the Registry. At first type regedit.exe in Run command which will open up the Registry Editor. Now go to HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ services \ {{ Your Service Name }}. In our case it is aspnet_state service. Now check the ImagePath, this ImagePath should be same as that of Path to executable. If its not same you will get error Windows could not start service on local computer, Error 2 : The system cannot find the file specified.


Now if both the path are same and still you are getting this error there can be another reason that the path you are referencing is more than 256 characters. Try to reduce the path by copying the exe files to some other location.

Please Like and Share the CodingDefined.com Blog, if you find it interesting and helpful.


No comments:

Post a Comment

Contact Us

Name

Email *

Message *

Sponsers

Best Hosting Plans

CC License