Re-Start a service at DOS prompt

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

How do I restart a service from a DOS prompt? And where do
I get a list of the actual service name? I of course know
where to see all the running services, but for instance
the one I want to restart is called Symantec Antivrus for
SMTP Gateways. Where do I see what Windows sees this
service as so I know what to put in my batch file?

Thanks
 
use the NET STOP and NET START commands
just enter the service name as it stands but in brackets

so something like this:
NET STOP "Symantec Antivrus for SMTP Gateway"
NET START "Symantec Antivrus for SMTP Gateway"

Daniel FABIAN
 
Jeff said:
How do I restart a service from a DOS prompt? And where do
I get a list of the actual service name? I of course know
where to see all the running services, but for instance
the one I want to restart is called Symantec Antivrus for
SMTP Gateways. Where do I see what Windows sees this
service as so I know what to put in my batch file?

and just running "net start" will list all services that
are running so you can pick up what name to use...
 
The "Services" control panel applet will enumerate all the services, running
or not. The "friendly name" from this list can be used on NET START / NET
STOP commands to start/stop the service. You can also right-click
Properties on the service in interest and find the "short name" of the
service -- NET START / NET STOP can use that name to manipulate the service
as well.

Finally, there is a commandline tool, SC.EXE, which gives you commandline
functionality of the "Services" applet.

--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
How do I restart a service from a DOS prompt? And where do
I get a list of the actual service name? I of course know
where to see all the running services, but for instance
the one I want to restart is called Symantec Antivrus for
SMTP Gateways. Where do I see what Windows sees this
service as so I know what to put in my batch file?

Thanks
 
In said:
The "Services" control panel applet will enumerate all the
services, running or not. The "friendly name" from this list can
be used on NET START / NET STOP commands to start/stop the
service. You can also right-click Properties on the service in
interest and find the "short name" of the service -- NET START /
NET STOP can use that name to manipulate the service as well.

Finally, there is a commandline tool, SC.EXE, which gives you
commandline functionality of the "Services" applet.

And/or psserice.exe www.sysinternals.com
 
In said:
The "Services" control panel applet will enumerate all the
services, running or not. The "friendly name" from this list can
be used on NET START / NET STOP commands to start/stop the
service. You can also right-click Properties on the service in
interest and find the "short name" of the service -- NET START /
NET STOP can use that name to manipulate the service as well.

Finally, there is a commandline tool, SC.EXE, which gives you
commandline functionality of the "Services" applet.

And/or psservice.exe

http://www.sysinternals.com/ntw2k/freeware/psservice.shtml
 
Also netsvc.exe from the RK. If you don't want to use any of these utils to
list the services, try something like
REG QUERY HKLM\System\CurrentControlSet\Services
 
Back
Top