Question Locked

Command line

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Does anyone know if there is a command to restart a XP local service.

I know we can Stop / Start using "stop" "start"

but is there a command just to restart the service?

Any help would be greatly appricated.

Thanks

5 replies

by ic-it

I don't believe you can send a restart, but you could write a simple sript or bat file to do this. A good example of a script can be found at http://www.computerperformance.co.uk/ezine/ezine68.htm
A bat file could be done with the net stop and then net start commands.

by ic-it

Darn I am getting rusty. Another way would be to add PSService. It can be found here with instructions. http://www.microsoft.com/technet/sysinternals/utilities/psservice.mspx

by symon.l

After looking through every site i can find...there is no restart command....

Ive even checked the Logs within XP and when i run the Restart command on the local spooler it uses Stop and then Start.

So anyone wanting to do this here is a very crude batch.

============================

ECHO OFF
sc \\%1 stop spooler
echo Press Any key to restart the spooler.
pause
sc \\%1 start spooler
============================

by geof.kenah

According to MS it goes like this:

"net stop service && net start service"
(Service is the name of the service you want to restart)

And no that is not a typo there are two "&" in the statement.

This discussion is closed to new replies.