I have a problem with one service which stuck at starting stage when I try to start such service, and I am not able to terminate such process. I know that restart is a solution, but server can't be restart couple times everyday, also any additional software like Process Explorer is not allowed to be installed and used.
So far I tried to use below solution (all commands were executed as admin):
taskkill /f /pid 7788
ERROR: The process with PID 7788 could not be terminated.
Reason: Access is denied.
C:\Windows\system32>wmic
wmic:root\cli>process where name="ProcesName.exe" delete
Delete '\\xxxxx\ROOT\CIMV2:Win32_Process.Handle="7788"' (Y/N/?)? y
Deleting instance \\xxxxx\ROOT\CIMV2:Win32_Process.Handle="7788"
ERROR:
Description = Access denied
wmic:root\cli>
C:\Windows\system32>wmic
wmic:root\cli>process where name="ProcesName.exe" call terminate
Execute (\\xxxxx\ROOT\CIMV2:Win32_Process.Handle="7788")->terminate() (Y/N/?)? y
Method execution successful.
Out Parameters:
instance of __PARAMETERS
{
ReturnValue = 2;
};
wmic:root\cli>
C:\Windows\system32>taskkill /IM "ProcessName.exe" /T /F
ERROR: The process with PID 7788 (child process of PID 680) could not be terminated.
Reason: Access is denied.
C:\Windows\system32>tasklist | findstr 680
services.exe 680 Services 0 9 084 K
java.exe 5832 Services 0 443 680 K