0

I am creating a Windows Service using sc commands with my application .exe file (app.exe) but after registering while starting with sc start the serice is not starting.

And how to give configuration file while creating a Windows Service?

After creating I am getting errors

"[SC] StartService FAILED 1053:

The service did not respond to the start or control request in a timely fashion."

sc create servicename binpath= "path of executable"
CodeCaster
  • 147,647
  • 23
  • 218
  • 272
jack
  • 11
  • 4
  • You can't just register any executable as a service, it has to be implemented as a service. – CodeCaster Aug 26 '19 at 07:50
  • https://stackoverflow.com/questions/3582108/create-windows-service-from-executable – CodeCaster Aug 26 '19 at 07:50
  • im bit confused now ..could you plese tell me how i can implement executalbe (.exe) as windows service – jack Aug 26 '19 at 08:28
  • That depends on the framework and language you're using. It's trivial in .NET. – CodeCaster Aug 26 '19 at 08:33
  • i got just an executable file which runs after invoking from command line and some configuration file written in json formate. – jack Aug 26 '19 at 08:38
  • Then see the question linked above. The app may have a command line parameter that accepts a path to the config file. – CodeCaster Aug 26 '19 at 08:39
  • Possible duplicate of [Create Windows service from executable](https://stackoverflow.com/questions/3582108/create-windows-service-from-executable) – JosefZ Aug 26 '19 at 09:46

1 Answers1

1

i solved the issue by using npm windows module

jack
  • 11
  • 4