We normally use Services.msc to start or stop or disable or enable any service. We can do the same from windows command line also using net and sc utilities. Below are commands for controlling the operation of a service.
Command to stop a service:
net stop servicename
To start a service:
net start servicename
You need to have administrator privileges to run net start/stop commands. If you are just a normal user on the computer, you would get an error like below.
C:\>net start webclient System error 5 has occurred. Access is denied. C:\>
To disable a service:
sc config servicename start= disabled
To enable a service:
sc config servicename start= demand
To make a service start automatically with system boot:
sc config servicename start= auto
Note: Space is mandatory after ‘=’ in the above sc commands.
This SC command works on a Windows 7 machine and also on the down-level editions of Windows i.e Windows XP/2003 and Windows Vista. Again, if you do not have administrator previliges you would get the below error.
C:\>sc config webclient start= auto [SC] OpenService FAILED 5: Access is denied.
Note that the service name is not the display name of a service. Each service is given a unique identification name which can be used with net or sc commands. For example, Remote procedure call (RPC) is the display name of the service. But the service name we need to use in the above commands is RpcSs.
So to start Remote procedure call service the command is:
net start RpcSsTo stop Remote procedure call service
net stop RpcSs
These service names are listed below for each service. The first column shows the display name of a service and the second column shows the service name that should be used in net start or net stop or sc config commands.
Display Name of the service | ServiceName which should be used with ‘net’ and ‘sc config’ commands. |
Alerter | Alerter |
Application Layer Gateway Service | ALG |
Application Management | AppMgmt |
ASP.NET State Service | aspnet_state |
Windows Audio | AudioSrv |
Background Intelligent Transfer Service | BITS |
Computer Browser | Browser |
Bluetooth Support Service | BthServ |
Bluetooth Service | btwdins |
SMS Agent Host | CcmExec |
Indexing Service | CiSvc |
ClipBook | ClipSrv |
.NET Runtime Optimization Service v2.0.50727_X86 | clr_optimization_v2.0.50727_32 |
COM+ System Application | COMSysApp |
Cryptographic Services | CryptSvc |
Cisco Systems, Inc. VPN Service | CVPND |
DCOM Server Process Launcher | DcomLaunch |
DHCP Client | Dhcp |
Logical Disk Manager Administrative Service | dmadmin |
Logical Disk Manager | dmserver |
DNS Client | Dnscache |
Lenovo Doze Mode Service | DozeSvc |
Error Reporting Service | ERSvc |
Event Log | Eventlog |
COM+ Event System | EventSystem |
Intel(R) PROSet/Wireless Event Log | EvtEng |
Fast User Switching Compatibility | FastUserSwitchingCompatibility |
Windows Presentation Foundation Font Cache 3.0.0.0 | FontCache3.0.0.0 |
Group Policy Monitor | GPMON_SRV |
Help and Support | helpsvc |
HID Input Service | HidServ |
HTTP SSL | HTTPFilter |
ThinkPad PM Service | IBMPMSVC |
Windows CardSpace | idsvc |
IMAPI CD-Burning COM Service | ImapiService |
iPassConnectEngine | iPassConnectEngine |
iPassPeriodicUpdateApp | iPassPeriodicUpdateApp |
iPassPeriodicUpdateService | iPassPeriodicUpdateService |
IviRegMgr | IviRegMgr |
Server | lanmanserver |
Workstation | lanmanworkstation |
Lenovo Camera Mute | LENOVO.CAMMUTE |
Lenovo Microphone Mute | Lenovo.micmute |
TCP/IP NetBIOS Helper | LmHosts |
Intel(R) Management and Security Application Local Management Service | LMS |
McAfee Framework Service | McAfeeFramework |
McAfee McShield | McShield |
McAfee Task Manager | McTaskManager |
Machine Debug Manager | MDM |
Messenger | Messenger |
NetMeeting Remote Desktop Sharing | mnmsrvc |
Distributed Transaction Coordinator | MSDTC |
Windows Installer | MSIServer |
Net Driver HPZ12 | Net Driver HPZ12 |
Network DDE | NetDDE |
Network DDE DSDM | NetDDEdsdm |
Net Logon | Netlogon |
Network Connections | Netman |
Net.Tcp Port Sharing Service | NetTcpPortSharing |
Network Location Awareness (NLA) | Nla |
NT LM Security Support Provider | NtLmSsp |
Removable Storage | NtmsSvc |
Microsoft Office Diagnostics Service | odserv |
Office Source Engine | ose |
Plug and Play | PlugPlay |
Pml Driver HPZ12 | Pml Driver HPZ12 |
IPSEC Services | PolicyAgent |
Power Manager DBC Service | Power Manager DBC Service |
Protected Storage | ProtectedStorage |
Remote Access Auto Connection Manager | RasAuto |
Remote Access Connection Manager | RasMan |
Remote Desktop Help Session Manager | RDSessMgr |
Intel(R) PROSet/Wireless Registry Service | RegSrvc |
Routing and Remote Access | RemoteAccess |
Remote Registry | RemoteRegistry |
Remote Procedure Call (RPC) Locator | RpcLocator |
Remote Procedure Call (RPC) | RpcSs |
QoS RSVP | RSVP |
Intel(R) PROSet/Wireless WiFi Service | S24EventMonitor |
Security Accounts Manager | SamSs |
Smart Card | SCardSvr |
Task Scheduler | Schedule |
Secondary Logon | seclogon |
System Event Notification | SENS |
Windows Firewall/Internet Connection Sharing (ICS) | SharedAccess |
Shell Hardware Detection | ShellHWDetection |
Print Spooler | Spooler |
System Restore Service | srservice |
SSDP Discovery Service | SSDPSRV |
Windows Image Acquisition (WIA) | stisvc |
System Update | SUService |
MS Software Shadow Copy Provider | SwPrv |
Performance Logs and Alerts | SysmonLog |
Telephony | TapiSrv |
Terminal Services | TermService |
Themes | Themes |
ThinkVantage Registry Monitor Service | ThinkVantage Registry Monitor Service |
Telnet | TlntSvr |
On Screen Display | TPHKSVC |
Distributed Link Tracking Client | TrkWks |
TVT Scheduler | TVT Scheduler |
Windows User Mode Driver Framework | UMWdf |
Intel(R) Management & Security Application User Notification Service | UNS |
Universal Plug and Play Device Host | upnphost |
Uninterruptible Power Supply | UPS |
Volume Shadow Copy | VSS |
Windows Time | W32Time |
WebClient | WebClient |
Windows Management Instrumentation | winmgmt |
Portable Media Serial Number Service | WmdmPmSN |
Windows Management Instrumentation Driver Extensions | Wmi |
WMI Performance Adapter | WmiApSrv |
Security Center | wscsvc |
Automatic Updates | wuauserv |
SMS Remote Control Agent | Wuser32 |
Wireless Zero Configuration | WZCSVC |
Network Provisioning Service | xmlprov |
I get this error when using this command, anyone have any idea why "
[SC] OpenService FAILED 1060:
The specified service does not exist as an installed service."
Which OS you are trying this on? Verify that you have given the service name correctly. May be the service you are trying to disable is not installed on the OS edition you have.
you can find the correct service name by doing the following:
Start > Run > services.msc
right click on the service you want to control and choose Properties
the service name will be listed at the very top of the window as "Service name" and NOT "Display Name".
We can see which services are being run in the background by typing services.msc in the run window. Also msconfig utility is one of the programs which lets us see which all programs are being started at the startup.
Yes, I have the same issue (Win 7 Pro). srservice does not start and when trying, it says "The service name is invalid" and does not show up in the Services list using services.msc. I have had a HDD failure and lost some data, clearly.
How can I re-install a lost service?
I want to start or stop the windows service using a batch script but I also want to enable some kind of log to capture any failure while start/stop. Kindly help.
Any issues with a command like below?
to disable windows error reporting on windows 7 :
sc config WerSvc start= disabled
I keep getting Access Denied, even though I am the administrator and there are no other users on this win7 machine.
I cant find out why sc stop just wont work!
I created service using SC. When I say start in cmd or in service in task manager, it says Access denied. I opened CMD with admin and I m admin of m achine
net start webclient and it was successful what to do then
I have full admin rights to my machine. I have changed all permissions to full control and still I get Access Is Denied when I try to stop services with net stop or sc stop. How can I get full control over the machine. OS is Windows 7 Home Edition
@John Douglas-Coley I had the same issue so what I did was,
1. Press the start button in the lower left corner.
2. In the search bar type “Command Prompt” without the quotation marks.
3. It should pop up right away when you see it right click and click run as administrator.
4. The command prompt should open up just type, net stop “windows update”
5. And boom it should stop! It worked for me anyways good luck to you!
Hey. I want to stop ekrn services, I’m an administrator, and when i type: “sc config ekrn start= disabled”, i’ve got this error:
[SC] ChangeServiceConfig échec(s) 5:
Accès refusé.
(Im french, so Accès refusé=Acces denied)
Someone help?
Looks like you are not running the command from elevated command prompt.
Great .. it is easy to understand & usable for respective situation ..
Thank you srini….
Hello. I’m with the admin user who will give this command
And see the error message follows
SC Stop Schedule
[SC] OpenService FAILED 5:
Access is denied.
If you ever get a 5 error code, you are not running the command line or powershell as an admin. Just because you are the admin of that box, does not automatically make you a command line / powershell admin.
RIGHT CLICK THE COMMAND LINE / POWERSHELL LINK AND CLICK RUN AS ADMINISTRATOR
Great. Thank you