start services via batch file?

M

MicroFox

O have set some services to manual,
and I would like to start them all (4 of them) with one
batch file..

how will I do this?

thanks
 
P

Pegasus \(MVP\)

MicroFox said:
O have set some services to manual,
and I would like to start them all (4 of them) with one
batch file..

how will I do this?

thanks

@echo off
net start "Name of Service 1"
net start "Name of Service 2"
net start "Name of Service 3"
net start "Name of Service 4"

P.S. Please go easy with your cross-posts, especially
when asking such simple questions.
 
M

MicroFox

Sorry, I didnt think it was an easy question since I posted the same
question some time ago and no one had an answer!

To stop the services do I do this? or what?

Net stop "name of service" ?

Also what do you mean with service name?
See this pic: http://img97.imageshack.us/img97/9019/vmware01fw3.jpg

Do you mean the service name that is displayed here as
"VMnetDHCP" ? So I just enter that inside the quotes in your example?

Thanks
 
P

Pegasus \(MVP\)

"net stop" is correct. You can omit the double quotes for
service names consisting of a single word, e.g.

net stop server

Run the command "services.msc" to see the correct names
of your services.
 
M

MicroFox

Great! With your help I was able to make the batch files....THANK YOU

I dont suppose.... you know about defining time outs to
a service? Because this one VMWARE server service
when run sets the timeout for the service to 120 seconds,
resulting in a long delay when the PC tries to shutdown..

I have found a registry edit to force the services to terminate when
shutting down, but I have to run that reg file each time before I shut down
the pc...

OR do you know how I can silently add a reg file to the registry by a batch
file so I wont have to confirm the
add of the reg file each time??

Thank you for your time!
 
P

Pegasus \(MVP\)

Thanks for the feedback. Use this syntax to modify the
registry silently:

regedit /s c:\YourFile.reg
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top