Windows – How to troubleshoot a Windows 10 service which does not let me stop it

dnsserviceswindows 10

I am trying to set the "DNS Client" service (also called dnscache) in Windows 10 to DISABLED.

However, when I enter into the services control for Windows the options to manipulate it are all "greyed out".

windows services controls options greyed out

I have also tried to terminate it from the Task Manager, but it throws up an error message saying that it is a matter of "access denied" (I'm running in a test box, as the sole administrative user).

windows task manager error message

I have also attempted to kill it from the command line as such:
taskkill /F /PID 3953
Doing this successfully kills the service but only for a split second! It then reappears immediately under a new PID.

How can I set the DNS Client (dnscache) to being disabled?

Best Answer

Note that the DNS Client does more than just cache DNS records - it gets them in the first place, so disabling it may limit internet access.

If you still decide to disable it, do this :

  • Use regedit to navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Dnscache,
  • Locate the Start registry key and change its value from 2 (Automatic) to 4 (Disabled)
  • Reboot.

Another method is :

  • Start a Command prompt (cmd) as SYSTEM (psexec -sid cmd.exe)
  • Launch services.msc from it
  • The Startup type drop-down now becomes enabled.