Theres a couple different ways..
first using regedit
REG ADD HKLM\software\microsoft\windows\CurrentVersion\run /v Yourprogram.cmd /t REG_SZ /d "C:\yourprogram.cmd" /f
you can type /ve instead of /v if you wish to enter no registry key name..
then using SC.EXE
sc create YourProgramName binPath= "C:\Yourprogramname.cmd -k runservice"
remember to add the space after binpath= this will register the cmd file as a service then start the service, im not sure if it works with .bat or .cmd files, but if you compile it to an executable it know it works..