At your command prompt, use the "sc create" Windows command to create your service. The correct syntax is as follows
How to create a Windows service to start or run a program automatically when starting your computer
C:\>sc create ServiceName binPath= "C:\Program Files\Programname\program.exe
to delete a service C:\sc delete ServiceName