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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Windows script to let user start/stop services

Status
Not open for further replies.

sugu

Programmer
Jan 12, 2004
90
SG
Hi,

I would like to know how can i get a user start/stop certain services using windows script.


thanks!

su
 
use the "net start" command.

Type net start /? for more info.

"net stop" will stop the service.

the syntax I believe is "net start <service name>"

>c:\net start messenger
will start the messenger service.

>c:\net stop messenger
will stop the service
 
Don't forget, if the service has more than one word you have to put the service name in quotes. Eg.

NET START "Event Log"

-----------------------------------------------------
&quot;It's true, its damn true!&quot;
-----------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top