I tried to create a service to launch an app as a service with srvstart.exe using this syntax
SC CREATE myapp DisplayName= "myapp" binPath= “srvstart.exe myapp -c E:\Systema\myapp\myapp.ini” start= auto
where myapp.ini is
[myapp]
startup=”E:\Systema\myapp\myapp.exe”
shutdown_method=winmessage
but whenever I try to start the service I get this message
THE myapp SERVICE ON LOCAL COMPUTER STARTED AND THEN STOPPED.SOME SERVICES STOP AUTOMATICALLY IF THEY ARE NOT IN USE BY OTHER SERVICES OR PROGRAMS
Have I done something wrong? Is there any other way to create a simple background service of an exe?