Lembro-me de transformar um aplicativo que não era um serviço em um serviço usando um pequeno utilitário chamado SRVSTART. Na página do autor , lemos:
SRVSTART.EXE
Synopsis. SRVSTART.EXE is a Win32 executable and DLL which allows you to run commands as if they were Windows NT services. It also has some features to enhance the running of ordinary console commands (prompting for parameters etc). The DLL can be used on its own to build a service without having to write any service management code.
SRVSTART.EXE operates in one of two modes.
- It can be used to run an ordinary command (executable program batch file). In this command mode, SRVSTART.EXE can prompt the user for the values of command-line parameters such as passwords.
- It can be used to run an executable program in the context of a Windows NT service (service mode). SRVSTART.EXE will itself handle all of the interactions with the NT Service Control Manager (SCM). It is not necessary for the program to include any service management code.
Ver como alguém escreveu um artigo sobre isso pequena ferramenta não há muito tempo, eu entendo que ainda é utilizável hoje.