Not often, of course, but sometimes you can encounter situations where, after closing a program in the Task Manager, the process responsible for its functioning does not end, or some additional (related) application services continue to work. In addition, the system may report that the user does not have enough rights to complete a certain process (access is denied). Why this happens and how to stop unnecessary or hanging programs, read the material below.
The process does not terminate in the Task Manager (access denied). Why?
To understand which solution to eliminate the problem that has arisen to use in each specific case, you first need to find out the reasons why they arise. Why doesn’t the process end in the “Task Manager” indicating a lack of access rights?
Indeed, sometimes this may be due to the fact that the user is not logged in as an administrator and is trying to terminate a critical system service or process started by another user. However, the inability to stop the operation of an application is mainly associated not even with system processes, but with programs that could be installed on the user’s computer spontaneously (viruses, advertising applets, etc.). Usually they are the ones that can block the shutdown. But dealing with such manifestations of behavior in both system and user programs or services can be quite simple.
Reboot the system
If a process does not end in the Task Manager, what should you do first? As a rule, ordinary users act quite simply. If for some reason the Windows 10 Task Manager does not terminate the process, they simply reboot the system. It is clear that a complete restart leads to a stop of all services. But what if after a reboot the process is activated again? But some processes launched along with the system cannot be tracked even in the standard startup section.
However, if the user is logged in not under the administrator account, but under his own account, as is already clear, you just need to change the user.
If you don’t want to constantly jump from one account to another, you can completely disable the administrator account by entering the command “net user Administrator active:no” (without quotes) in the command line. After this, all programs will start only with administrator rights (for some applications, even UAC security warnings, which are incredibly annoying to many users, will not be issued).
Terminating active processes via the command line
But the above actions may not always have a positive effect. What should you do if Task Manager does not terminate a process that is, say, overloading the central processor or using RAM too hard? In such a situation, the best tool available on Windows systems is the command console (cmd).
It must be run as an administrator (if the superuser account is not disabled), and then use the taskkill command (all information about additional attributes can be viewed by entering the line “taskkill /?”).
Of the entire list, we are most interested in the attributes “/F” and “/IM”, which are added after the main command. What does it look like? Let's assume that the Google Chrome process does not end in the Task Manager. The command to force stop the application will look like this: “taskkill /F /IM Chrome.exe” (again, without quotes). As is already clear, this solution is acceptable for executable program files. If you use the additional key “/T”, when you enter the main command to shut down the selected application, all child processes will automatically be terminated.
Force termination of a hung service in PowerShell
You can also use PowerShell to force stop the service. You can use the following command to get a list of services that are in the Stopping state:
Get-WmiObject -Class win32_service | Where-Object {$_.state -eq 'stop pending'}
Stop-Process cmdlet will help you terminate the process for all found services . The following PowerShell script will terminate all hung service processes in Windows:
$Services = Get-WmiObject -Class win32_service -Filter "state = 'stop pending'" if ($Services) { foreach ($service in $Services) { try { Stop-Process -Id $service.processid -Force -PassThru - ErrorAction Stop } catch { Write-Warning -Message » Error. Error details: $_.Exception.Message" } } } else { Write-Output "No services with 'Stopping'.status" }
In the new PowerShell Core 6.x/7.x, you need to use Get-CimInstance instead of the Get-WmiObject cmdlet. Replace the first command in the script with: $Services = Get-CimInstance -Class win32_service | where-Object state -eq 'stop pending'
Stopping processes by specifying identifiers
If the process that was selected by the user does not end in this way in the Task Manager, for example, if the name of the executable file of a problematic program or service is entered incorrectly, the process can be stopped by specifying the identifier.
It can be viewed in the Task Manager itself, additionally activating the display of the column with the process ID. The main command in this case will take the following form: “taskkill /F PID 0000”, where 0000 is the process identifier defined in the “Task Manager”.
Analyzing the Wait Chain of a Hanging Application Using ResMon
You can determine the process that is causing the service to hang by using Resource Monitor (resmon.exe).
- In the Resource Monitor window, go to the CPU tab and locate the hung service process;
- Select an item Waiting chain analysis (Analyze Wait Chain);
- In the new window, you will most likely see that another process is waiting for you. Complete it. If you are waiting for the svchost.exe system process, you do not need to terminate it. Try to analyze the waiting chain for this process. Find the PID of the process your svchost.exe is waiting for and terminate it
Tip from Microsoft
In principle, the problem associated with the fact that the Task Manager does not terminate the process of some program can be solved by following the advice of Microsoft specialists, which are published on the support page. The idea is to download a special archive from the website containing the PSTools toolkit, then unpack it to your hard drive and move the PsExec.exe file or the PsExec64.exe object, depending on the system architecture, to the root of the system partition (drive “C” ), and then through the command console run the command “c:psexec -i -d -s taskmgr.exe” (without quotes). After this, in the “Task Manager” you will need to perform all the necessary actions related to stopping certain processes, then close the “Manager” and delete the source PsExec file from the system partition.
Method 2: through the menu
How can I close a program if it won't close? The following trick works more often than a keyboard shortcut. Users use it in practice with noticeable success. To close a frozen application, you can call up the program action menu, and then select the appropriate function there.
To do this you need:
- Place the cursor over the program window on the taskbar.
- Right-click on the appropriate application.
- In the menu that appears, select “Close window”. If the system issues a warning, agree with it.
- Wait a while.
As a rule, after the actions taken, the program closes on its own after 10-15 seconds. If this method does not help, no need to panic. You can try using other methods. Luckily, Windows provides quite a few ways to close applications.
Using Process Explorer
It is much easier to use the small Process Explorer application, which is an alternative to the Task Manager, but with advanced capabilities. The advantage of this program is that there is no need to install it on your hard drive, since the application is natively portable and runs from a single executable file. After starting the program, it is enough to select the desired incomplete process or even an entire tree of processes with child applets by selecting the Kill Process or Kill Process Tree commands from the RMB menu.
In addition to “killing” unnecessary processes and tasks, this utility also provides additional information. So, for example, if this is required, you can quite simply find out which program is running a particular process.
Method 5: radical approach
How can you close a program if it freezes? The next method is radical. There is no need to rush with it, even though it is considered the simplest. The thing is that in order to successfully complete programs, you need... a reboot of the operating system.
Skype won't close? How to close it? Exactly the same as all other applications. First, try all the methods listed earlier. If they do not help, then the user has no choice but to restart the computer.
It is not recommended to use Start. After all, frozen programs sometimes interfere with the corresponding operation. Instead, you need to find the Reset button on your computer and click on it. This is an emergency reboot. This option works on desktop computers. It is recommended to save all data in other applications before using it. In addition, it is worth considering that constantly restarting the computer does not have the best effect on the performance of the device.
Unblocking access to process files
Finally, if it is impossible to terminate certain processes only because access to the file responsible for it is blocked, it may very well be possible to correct the situation by using the Unlocker utility.
First, as is already clear, access to the original file is restored (you can find it directly in the “Task Manager” by selecting view file location from the RMB menu), and then the process is completed in the usual way.
Problems of viral exposure
Viruses, unfortunately, can also limit access to stopping processes and services. And this is not always directly related to the virus applets themselves. If such a situation occurs, it is first recommended to check the system with some portable antivirus, and if it is impossible to neutralize threats, turn to the Kaspersky Rescue Disk program, with which you can boot even before the system starts from removable media, and then perform a deep scan, which includes even RAM itself.
Brief summary
That, in fact, is all that concerns the forced termination of processes in the “Task Manager”. As for the best tool, the alternative manager Process Explorer seems to be the simplest. If you don’t have such a program at hand, the command line will do. The only condition for executing all the above commands is to start the console itself with administrator rights.
Hello everyone. Does it ever happen to you that you need to end some process, but you just can’t do it through the task manager? Common situation? Well, today we will deal with this matter!
But in what cases can such a situation arise? You know, I think that this kind of thing happens rarely with ordinary programs, but with all sorts of not very necessary programs it happens often. All these programs that are installed, so to speak, on your computer without your knowledge, all these programs do everything to make them difficult to remove later. And this is a process that cannot be completed, this is one of their tricks. It also happens that the files of such programs cannot be deleted, here I advise you to look towards the Unlocker program, it deletes non-deletable files, a suitable program. In general, guys, if you cannot complete the process or delete some suspicious folder or file, then it smells like a virus...
Speaking of viruses, do you think you don’t have them? No, I don’t want you to have them, but believe me, now there are such viruses... They can live for months and you won’t even know about it: not all viruses are interested in your VKontakte account, your mail, many are simply interested in the power of your hardware. To use a small percentage of this power for your own tasks.. After all, a small percentage is more difficult to notice.. Do you think it’s nonsense? No way guys! In short, this is all talk, I just wrote this to say that be careful (not only on the computer, but in life in general) and REGULARLY check your computer with these two FREE utilities: Dr.Web CureIt! and AdwCleaner. These are the best utilities, believe me!
So, let's get down to business, to end a process that does not end in the manager, you need to download the Process Explorer program. This is a free program and do you know why you can trust it? Because it's on the Microsoft website, so download it guys! When you go to the page, on the right side you will need to click on Download Process Explorer
So, have you downloaded it? Great! But you remember where you downloaded that. It’s just that Process Explorer DOES NOT INSTALL, it works like this, without installation, just launch it and that’s it! So, we launched it and this is the window that will open, this is what Process Explorer looks like:
Well, what can I say? Everything was done very cool, because it’s very convenient to see the processes, who started who, and a lot of information! In short, the program is super and it’s noticeable. It turns out that this is an advanced task manager! In this program, to end a process, you need to right-click on it and select Kill Process or Kill Process Tree. The first command simply terminates the process, while the second terminates the process tree. These are the points:
Terminating processes
If, while working on your computer, you begin to notice that it noticeably freezes, it means that it is difficult for it to perform all the tasks assigned to it. This happens when you start a lot of processes and then simply forget to stop them.
Of course, if you don’t get carried away with opening new applications, you’ll be able to encounter the problem of your computer freezing less often. Well, if you were working very enthusiastically, so you didn’t notice how you opened many windows, launched several software applications and utilities, then closing them by simply clicking on the “Exit” button may not work.
Algorithm of actions
To terminate unwanted processes that refuse to obey the user, you need to use the help of the Task Manager. If you have Windows 7 installed, just right-click on the bottom taskbar and select the “Launch Task Manager” option.
Step 1
In the window that opens, on the first tab, click on the utility that you no longer need, and then at the bottom of the window select the “End task” option. If the process is not completely hopeless, it will stop.
Step 2
You can go to the second tab “Processes”, in the same way click on the line that is causing problems at a particular moment, and then click on the “Finish” button.
Check the option to show all user processes
Unfortunately, even such advice sometimes turns out to be completely useless for some users, since the process in the Task Manager still does not close.
If such a problem happened to you, you despaired and already believed that the only way out of such a problematic situation would be to force a reboot of the operating system, we suggest that you do not panic, but read our following recommendations.
Step 3
So, do not say phrases like: “I can’t kill the process in the Task Manager,” but rather take advantage of the unique capabilities of the taskkill utility command. Many are ready to consider this team as a powerful tool.
To run such a command, first, of course, you need to open the command line by holding down two keys at the same time: “Win” and “R”. In the small window that opens, enter “cmd”.
Step 4
Now you will need to type “taskkill” and press “Enter”. However, to deal with an uncontrolled process, an additional option should be attached to this word.
Specifically, you can terminate a process using the taskkill command using the name of the application that refuses to terminate. To do this, type a small command phrase: taskkill / IM “application name”. Of course, instead of the phrase “application name” you should type the process that you cannot stop. For example, taskkill /IM excel.exe. If you use our example, then in this case the Excel spreadsheet editor will stop working. Choose your process that is causing you terrible trouble and add its name to the command.
In the window, processes are displayed not only with their name, but also with their identifier. If you wish, you can type the following command phrase: taskkill / PID 574, where the number 574 will be the ID of the problematic process.
Step 5
If there are several accounts on the computer, and it is absolutely clear that the freeze occurred precisely because of the unfinished processes of one of the users, you can use the following command phrase: “taskkill / F / FI “USERNAME eq username”. It is clear that in it you will have to independently change the username directly due to whose fault the problem arose.
Use the new command phrase
We recommend that you practice using these commands. If you succeed, you will be able to avoid forced reboots that mercilessly damage the operating system.
The “taskkill” command is indeed a powerful tool that even viruses and Trojans cannot resist. Such a team successfully completes even their negative and persistent “activities”.
Fixing the "Access Denied" error when working with services in Windows 10
The “Access Denied” error indicates restrictions on user rights that were automatically set by the administrator or system. In most cases, the occurrence of such a situation is associated with system failures, so you have to go through possible solutions to solve it. We suggest starting with the most obvious and effective ones, gradually moving on to more complex and rare fixes.
Method 1: Setting up system partition access rights
As you know, all files related to the operating system are stored on the system partition of the hard drive. If there are any legal restrictions on it, various problems may arise when trying to interact with standard files, including services. This problem is resolved as follows:
- Through “Explorer”, go to the “This PC” section, find the local system disk there, right-click on it and select “Properties”.
- In the window that opens, go to the “Security” tab.
- Click on the “Change” button after deselecting any account.
- Click on “Add” to create a new group or user in the allowed list.
- In the “Enter names of selected objects” field, write “All” and click on “Check names”.
- This inscription should become underlined - this means that the test was successful. After that, just click on “OK” to save the changes.
- There will be an automatic transition to the same “Security” tab. Now about and set permissions to Full Control. Be sure to apply the changes before exiting.
- The process of making security edits will take a few minutes. Do not close this window to avoid interrupting the operation.
After applying the new security rules, it is recommended to restart the computer, and only then launch the “Services” window and try to make the necessary changes, checking the effectiveness of the settings just made.
Method 2: Editing the Administrators group
The next solution will involve changing the local user group called Administrators. The principle of this method is to add rights to manage local and network services. To do this, you will have to run two commands in the console as an administrator, which even the most novice user can handle.
- The Command Prompt application must be run as an administrator. The easiest way to do this is to find the console through “Start” and select the appropriate item there.
- First of all, enter the command net localgroup Administrators /add networkservice and press Enter.
- You will be notified when it is completed.
If instead you receive the error "The specified local group does not exist" , write its name in English - "Administrators" instead of "Administrators" . The same must be done with the command from the next step.
Now you can enter the second command net localgroup Administrators /add localservice. Close the console after the “Command completed successfully” line appears.
After completing this operation, be sure to restart your computer, since the installed configuration is activated only when you create a new session.
Method 3: Check a specific service
This method is suitable for those users who experience problems with the “Access Denied” notification appearing only when working with specific services. The problem may be that the restrictions are set directly for the service itself, and this can only be checked through the registry editor.
- First you need to determine the system name of the service. Launch “Start”, find the “Services” application through the search and launch it.
- Find the line with the required parameter and double-click on it to go to properties.
- Review the contents of the Service Name line.
- Remember it and launch the Run utility using the Win + R key combination. Type regedit and press Enter.
- In the Registry Editor, navigate to the path HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServices.
- In the final folder, find the directory with the name of the desired service and right-click on it.
- Through the context menu, go to “Permissions”.
- Make sure that the Administrators and Users groups are set to Full Permissive Access. If not, change the settings and save your changes.
Now you can change the status of the setting directly in the Registry Editor or return to the Services application to check whether the actions you took helped get rid of the problem.
Method 4: Enabling privileges for LOCAL SERVER
In Windows 10 there is an account called LOCAL SERVER. It is system-based and is responsible for launching certain options, including when interacting with services. If none of the previous methods brought the desired result, you can try to set separate rights for this account, which is done like this:
- Go to the properties of the local disk with the operating system through the context menu, open the “Security” tab and click on “Change”.
- You will need to click on “Add” to proceed to the profile search.
- In the window that appears, move to the “Advanced” section.
- Start searching for accounts.
- Select the one you need from the list now.
- Then give her full access to manage system components and apply the changes.
Method 5: Check your system for viruses
The last method being discussed today involves checking the system for viruses. It should be used in cases where none of the above options helped solve the problem - then there is reason to think about the effect of malicious files. It is quite possible that some kind of virus is simply blocking access to services, and the problem itself will be solved only after it is removed and system objects are restored. Read more about this in a separate article on our website below.
Read more: Fighting computer viruses
Now you know how to deal with the “Access Denied” problem when trying to change the state of a service in Windows 10. All that remains is to follow each method one by one in order to find an effective solution as soon as possible. We are glad that we were able to help you solve the problem. Describe what didn't work for you. Our specialists will try to answer as quickly as possible.