How to overcome Access Denied when killing process in Windows?

244,566

Solution 1

Depending on the state of the process, there may be no way to kill it at all. See this answer for a more detailed discussion, the crux of which is:

If it doesn't go away, it's currently locked waiting on some kernel resource (probably a buggy driver) and there is nothing (short of a reboot) you could do to make the process go away.

Check this Wikipedia section:

The purpose of the administrator account is to allow making system-wide changes to the computer (with the exception of privileges limited to Local System)

As the Adminstrator, you're (close to) the boss of user space (apart from the above caveat about Local System). The buggy driver is running in kernel mode. See Jeff Atwood's writeup on the two modes here.

Solution 2

Process Hacker utility will do this for You for Your own risk, of course, because killing system processes is sometimes risky!

Solution 3

I can confirm all these "unable to kill the application, access denied" problems are related to faulty drivers.

I had that problem in Windows 8.1 for quite some time, it was driving me nuts until I discovered it was one of my USB MIDI controllers.

So..! the best way to solve this is:

  1. you get the stuck app, it says "access denied" when you try to kill it.

  2. Open your task manager.

  3. Start disconnecting devices while looking carefully at the task manager.

  4. Once you unplug something and the app goes away from the task manager you KNOW it is causing the problem.

  5. Update the driver or wait for a new one for the offending device.

Share:
244,566

Related videos on Youtube

Dims
Author by

Dims

Software developer & Machine Learning engineer C/C++/Java/C#/Python/Mathematica/MATLAB/Kotlin/R/PHP/JavaScript/SQL/HTML/ LinkedIn: http://www.linkedin.com/in/dimskraft Telegram: https://t.me/dims12 I prefer fishing rod over fish.

Updated on September 18, 2022

Comments

  • Dims
    Dims almost 2 years

    How to kill process which does not want to? I have Access Denied message when trying to kill the process. I know it can be due to device driver waiting and probably this is the reason.

    But my question is how to kill process nevertheless? I am administrator, I don't want a process to wait any device drivers or something. I want it to die.

    How to accomplish this?

    Running Task Manager, procexp and procexp64 as an administrator didn't help.

    • Austin T French
      Austin T French about 11 years
      What process is it?
    • Dims
      Dims about 11 years
      Any which write to disk. For example javaw.exe
    • Frank Thomas
      Frank Thomas about 11 years
      Interesting. I can kill the system process and force a blackscreen reboot using Process Explorer, so I am suprised that there are things you can;t kill with it.
    • Dims
      Dims about 11 years
      I am surprised too. But this is the fact.
    • Austin T French
      Austin T French about 11 years
      Is Java running anything else? What account is running it? Yours? Is it a child / parent of anything?
    • Dims
      Dims about 11 years
      Nothing special. Java was just an example. Eclipse running Java, Java running Tomcat. Account is mine. The suspected reason is Windows bug in disk driver, so any application can hang such a way. The question is how to kill it.
  • Dims
    Dims about 11 years
    It is a way: I can logoff then logon. But this is long way. Is there a short one?
  • Dims
    Dims about 11 years
    Also it is strange, that being an administrator, I am still limited in rights. Buggy driver also should be killed in the case.
  • Geoff
    Geoff about 11 years
    See my edit above.
  • user1984103
    user1984103 about 11 years
    @Dims You can't just kill a buggy driver. Drivers can only be gracefully removed; Anything else will involve a system crash. So if a driver won't respond to a signal that it needs to unload, the only solution is to shut down the system and not load the driver when you start it back up.
  • Dims
    Dims about 11 years
    The how can I kill the process if logoff then logon? No system crash occur and no reload!
  • TheFrost
    TheFrost over 10 years
    And... how to unplug internal CDRom in laptop? ;)
  • Jesse Chisholm
    Jesse Chisholm about 9 years
    I could physically unplug my thumb drive, but an application I don't want to kill has locked it from normal Eject. And that application won't exit gracefully until I get rid of the orphaned/zombie process (also run off the thumb drive). Catch-22.
  • Donald Duck
    Donald Duck about 6 years
    It didn't work. When I tried it, I got an error message saying "unable to terminate mspaint.exe". Also, it's not a system process I want to kill, it's a process that I started myself and that isn't responding (in this case Paint, but I've had the same problem with other programs).
  • goamn
    goamn about 6 years
    This is perfect, it worked :). Killed bitdefender (which was locked by IT admins), this program always increases memory footprint with time. Process Hacker was able to terminate it while Process Explorer (Procexp) wasn't able to.
  • Lestat
    Lestat over 4 years
    Wow, I have this problem for long time, it was my mouse not plugged in correctly, I unplugged several things till I got to my mouse, some way it was pulled before and I didn't put much attention to "a usb device is not working properly" message I got, because everything was working well, even that mouse.