Solution 1:

you must kill child process too if any spawned to kill successfully your process

taskkill /IM "process_name" /T /F

/T = kills child process

/F = forceful termination of your process

Solution 2:

The taskkill and powershell (kill) methods didn't work for me; it still said "Access Denied".

I had better luck with this:

wmic process where "name='myprocessname.exe'" delete

Solution 3:

Reboot is the only solution that worked for me (so far).

The ever excellent Mark Russonovich has a good explanation for unkillable processes.

To summarise, it's quite possible it is due to unprocessed I/O requests that hasn't been handled properly (by a device driver your program has possibly accessed)

https://techcommunity.microsoft.com/t5/windows-blog-archive/unkillable-processes/ba-p/723389

Solution 4:

Just had the same issue on Windows Server 2008 R2 and nothing helped, not taskmanager or taskkill. But, windows powershell run as administrator worked with "kill -id pid"

Solution 5:

I know it's late but taskkill /im devenv.exe /t /f should work. the /t kills child processes too.