Net Stop /Net start command syntax

I need to turn off Virus protection before a backup job and then restart the services after the job is complete.

I need a command line within a batch file to do this.
____________________________
I have tried:

NET STOP rtvscan.exe

the error returned is:

System error 1060 has occurred.
The specified service does not exist as an installed service.
___________________________
I have also tried:

NET STOP c:\program files\NAV\rtvscan.exe
and it returns a syntax error:

The syntax of this command is
NET STOP service.
__________________________________


300 points for a fast response.

Thanks,

Whit

wbaker57Asked:
Who is Participating?
 
dlb6597Connect With a Mentor Commented:
you need to use the actual service name as it appears in control panel, services.  If it contains spaces, you must put quotes around the service name.

0
 
vinnyd79Commented:
to get the actual service name just type in NET START without any parameters.It will give you a list of all the running services so you can get the actual service name.Then just use

net start servicename
0
 
vinnyd79Commented:
oops,I meant net stop servicename
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

 
jkrCommented:
net stop rtvscan

should do it.

If not, you can find the correct service name in the registry under

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
0
 
wbaker57Author Commented:
Thanks,

Quotes were the trick.
0
 
FixyCommented:
Syntax is: net stop NavExchange
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.