-1

For some time I'm facing a very frustrating situation, all of a sudden every internet connection that uses domain instead of IP start failing. Active connections continue working, softwares that had cached the IP continue starting connections, IP connections work, but anything that requires DNS resolving stops. Only solution I had found is to restart Windows.

I had diagnosed that Windows DNS client/dnscache is crashing. I tried to restart it but I'm unable to, because it runs under Network Service account.I found https://superuser.com/questions/1277952/how-to-troubleshoot-a-windows-10-service-which-does-not-let-me-stop-it with the same exact issue, everything is grayed out and I can't change anything. I don't wanna disable it, only stop and restart.

That question has an answer explaining how to do it, but it seems that on last Win10 versions it stopped working too.

I understand M$ did that to restrict access to these services, but dnscache is crashing and I'd rather restart it than the whole OS.

Hikari
  • 3,797
  • 12
  • 47
  • 77

1 Answers1

1

If you use the taskkill command and start command on the same object on the same line (separated by &) it stops and reopens the task which restarts the task. This can be seen the most with explorer.exe which when you close explorer with taskkill /f /t /im explorer.exe && start explorer.exe while you have blue light filter on, the blue light filter will flicker because of the close of explorer.exe and also every app will still stay up as oppose to when you put these two commands on different lines where everything will close. If you know the name of your service you want to restart, you can use:

taskkill /f /t /im "<name of process>.exe" && start <name of process>.exe

and put it in a file with the .bat file extension. This should work, if you have any questions, just ask them in the comments below.

SP Tutors
  • 238
  • 2
  • 6