Running a bacth file on startup

Soldato
Joined
26 Oct 2002
Posts
3,753
Location
Surrey
Hi Guys,

I am trying to run a batch file on startup. I want it to run in the background so I decided to make it a service by doing:

Code:
sc.exe create "Service Name" binPath= "C:\Your Program.exe"

But when I try to run it I get the error "Error 1053: The service did not respond to the start or control request in a timely fashion".

Does anyone know what's going wrong here? Or, alternatively, can anyone suggest a different way to achieve what I've described?
 
go to cmd and type the commande /? then look at the extra bits of code you can use -f -s -m one of them will run it in the background i forget which one alternetly you could just run it at the msconfig or use winpatrol and stick the paramater in that....
 
Hi, which command should I be looking at? sc.exe doesn't appear to have the flasgs you mention ...
 
" /s " should run it in the backgroud with no command window where to put it im guessing either at the end of the exe or the command....
 
Back
Top Bottom