options for starting a service on boot in Linux (easy to hard):
easy!
Just put your commands in rc.local and they will run ONCE on boot.
This file needs to be executable, and it also needs to exit.
#!/bin/sh
echo "rc.local worked" >> /var/log/itworked.log
nohup su - USER_FOOBAR -c /PATH/TO/MY_APP &
NOTE! Does not work in every single case
crontab -e
@reboot echo "cron @reboot worked" >> /var/log/itworked.log
cp /etc/init.d/skeleton /etc/init.d/myservice
then edit the first few lines of myservice to run your application instead
then...
service myservice start
service myservice stop
Hit win+r, then run shell:common startup. This will open the startup dir, which contains userland stuff that runs when they log in.
sc.exe create <new_service_name> binPath= "<path_to_the_service_executable>"
You must have quotation marks around the actual exe path, and a space after the binPath=.