How to run .exe as a service? RRS feed

  • Question

  • I have .exe file. I want to run it as a service. I try this way fom cmd

    sc create "MyServ" binPath= "D:\app.exe"

    it return this

    [SC] CreateService SUCCESS

    I open Services window and MyServ exist. I right click and Start. But it return this error.

    Windows could not start the MyServ service on Local Computer.
    Error 1053. The service did not respond to the start or control request om a timely fashion

    Anyone can give me any idea about this. Thank you.

    Monday, December 16, 2019 7:34 AM

All replies

  • Your question has nothing to do with scripting.

    You cannot run an exe as a service.  A service is a very special kind of binary designed to run as a service.  I suggest doing a little research to learn how Windows and most other operating systems work and what a service is.


    Monday, December 16, 2019 7:47 AM