I have create a small script file to test.
This my script.bat file.
sc create myService binpath= C:\Users\Admin\Desktop\test.bat start= auto
This is my test.bat file.
echo "Welcome to Wizard"
I am unable to start the service from control panel Service section.
I get following error.
[SC] StartService FAILED 1053: The service did not respond to the start or control request in a timely fashion.
That is why I am using nssm.
NOW what happening is that when I run following command on powershell
.\nssm install myService, I dialogue box appears. I give it the path of my script file and click on install service.
After successfull installation of service. I go to control panel -> Service -> click on start against myService but it get paused and following dialog box appears
Window could not start myService service on Local Computer. The service did not return an error. This could be windows error or internal service error. If problem persist contact to your system administrator.
- How can I fix this?
- Is there anyother way to do it without doing manual steps and not using third party tool.
- I am doing all this on window 10. Do I need any server to perform this task?
NOTE: I cannot use Always up or window scheduler in my case.