• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 229
  • Last Modified:

start/stop services

I would like to ask ,  how to write a windows script or command-line in order to start/stop the services in administrative tools
0
cheng77
Asked:
cheng77
1 Solution
 
blakogreCommented:
Go to start/programs/administrative tools and select Services

Double click on a service, and note the name.

In your batch file, add a line:

to stop a service:
net stop <service name>

and to start a service:
net start <service name>

0
 
xopracCommented:
I agree with blakogre. Make sure you save it as a batch file.
0
 
PMGreenstedCommented:
Just to same time the service should be in double quotes. eg...

C:\>net stop "Microsoft Exchange Event Service"
The Microsoft Exchange Event Service service is stopping..
The Microsoft Exchange Event Service service was stopped successful

C:\>net start "Microsoft Exchange Event Service"
The Microsoft Exchange Event Service service is starting.
The Microsoft Exchange Event Service service was started successful
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now