Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating Windows service using sc.exe

Status
Not open for further replies.

mpezeur

MIS
Nov 7, 2002
123
US
Trying to setup a Windows service, using sc.exe (resource kit) that will call a .bat file.
The bat file performs the following:

- Starts 3 Windows services (they have to be started in a particular order) via net start

- maps a network drive to k:

When I try to start the service via "Services" I receive the error "The service did not respond to the start or control request in a timely fashion." and nothing happens.

I used the following command to create it:

sc create ServiceName binPath= c:\winnt\drivemap.bat type= own start= auto

What am I doing wrong?
 
I could be wrong here, but seems to me you can only make .EXE files a service with that procedure.

Have you considered using Task Schedualer to run your 3 batch files?





"In space, nobody can hear you click..."
 
NT4 resource kit had a utility called SRVANY which could create Services to run .BAT files. This can be used with Windows2000 OK.

-------------------------------

If it doesn't leak oil it must be empty!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top