on August 21, 2010 Show
This post explains how to stop Windows update service from command line(CMD). Make sure that you open elevated administrator command prompt to execute this command. How to stop Windows update serviceDo the following
Example: C:\Users\Administrator>net stop wuauserv The Windows Update service is stopping. The Windows Update service was stopped successfully. Update service restarts automaticallyIt’s observed that just stopping the service does not work in some cases and it restarts automatically. In such cases one can disable the service completely by running below command. C:\>sc config wuauserv start= disabled [SC] ChangeServiceConfig SUCCESS Note that these commands to stop or disable service should be run from elevated administrator command prompt. Other wise you will get the following error. C:\Users\administrator>net stop wuauserv System error 5 has occurred. Access is denied. How to start windows updatenet start wuauserv Example: C:\Users\Administrator>net start wuauserv The Windows Update service is starting. The Windows Update service was started successfully. How to manually kill a Windows service process that is stack at “ If within 30 seconds after trying to stop the service, it doesn’t stop, Windows displays this message: Windows Could not stop the xxxxxx service on Local Computer Error 1053: The service did not respond in a timely fashion. The timeout that the Service Control Manager waits for a service to start or stop can be changed by using the ServicesPipeTimeout registry parameter. If the service doesn’t start within the specified timeout, Windows sends an error to the Event Viewer (Event ID: 7000, 7009, 7011, a timeout was reached 30000 milliseconds). You can increase this timeout to 60 seconds, for example:
This is useful when starting/stopping heavy services that do not have enough time to properly terminate all processes and close the files (for example, MS SQL Server). If you try to stop such a service from the command prompt: The service is starting or stopping. Please try again later. or: Windows could not stop the Service on Local Computer. [SC] ControlService Error 1061: The service cannot accept control messages at this time. How to Force Kill a Stuck Windows Service Using TaskKill?The easiest way to stop a stuck service is to use the built-in taskkill command-line tool. First of all, you need to find the PID (process identifier) of the service. As an example, let’s take the Windows Update service. Its system name is Important. Be attentive. Forced termination of critical Windows services can result in BSOD or an unexpected system restart. Run this command in the elevated command prompt (it is important, or access denied error will appear):
SUCCESS: The process with PID 9168 has been terminated. This command will forcibly terminate the service process. Now you can start the service with the You can stop a hung service more elegantly without manually checking the PID of the service process. The taskkill tool has the /FI option, which allows you to use a filter to select the necessary services or processes. You can kill a specific service with the command:
Or you can skip the service name at all and killing all services in a hung state with the command:
After that, the service that is stack in the Stopping status should stop. You can also use the taskkill utility to force stop the hang services on a remote computer:
Force Stop a Stuck Windows Service with PowerShellYou can also use PowerShell to force the service to stop. Using the following command, you can get a list of services in the Stopping state:
Or in the Starting state:
The Stop-Process cmdlet allows terminating the processes of all found services. The following PowerShell script will terminate all stuck service processes on Windows:
You must use the
Analyzing the Wait Chains on Hung Services Using ResMonYou can detect the process that caused the service to hang using the resmon.exe (Resource Monitor).
Killing a Hung Service Using Process ExplorerEven the local administrator cannot terminate some processes that run under the SYSTEM account. The fact is that the admin account simply hasn’t permissions on some processes or services. To stop such a process (service), you need to grant permissions to the service (process) to the local Administrators group and then kill them. To do this, we will need two small tools: psexec.exe and ProcessExplorer (available on the Microsoft website).
How do I force stop Windows Update service?How do I force Windows Update Service to stop?. Press Win + R to open the Run command. Next, type services. msc and press Enter to open Services.. From the Services list, find the Windows Update service and open it.. Under the General tab, change Startup type to Disabled. Click Apply > OK.. Restart you PC.. Why can I not stop Windows Update service?You must have administrative privilege to stop the Windows Update service. If your account doesn't belong to the Administrator group, you might not be able to stop this service on your computer. Therefore, log in to your Administrator account and stop the Windows Update service using Services or Command Prompt.
|