Running at boot
Turn your process into a Windows Service using the sc command. Basic syntax:
sc create NewServiceName binpath= c:\windows\system32\newserv.exe
Note the space after
binpath=. Once you create the service you can configure it to run automatically like any other service. If you're unclear on that, go to the start menu and choose
services.msc into the window that opens. This will open the services snap-in in the Microsoft Management Console. From here you should be able to find your service listed (among many others) and set it to run automatically using the gui tools. You could also make this part of your
sc create command, but for a novice it's likely much easier to just get the darn thing created and then use the gui tools to set it up the way you want.
One final caveat is to make sure you run this with an account that has the appropriate permissions. The Service or System accounts are best, but sometimes you need something different.
Restarting on demand
A little batch (*.bat) file will do the trick:
sc stop NewServiceName
sc start NewServiceName