What is the proper way to close unresponsive processes?

Page 1 of 6 123 ... LastLast

  1. Posts : 582
    Windows 10 Pro 64 bit 19044.1706
       #1

    What is the proper way to close unresponsive processes?


    I used taskkill so far to kill unresponsive processes:
    Code:
    taskkill.exe /F /FI "status eq NOT RESPONDING"
    However I read this is not a safe way to close process! It could mess up registry, or Windows, or program data!!!

    There is also cmdlet: Stop-Process, it works similarly. But I have no idea, if this is any better. Still you need to force process to close, otherwise it won't close! Taskkill might be still better than hard restart tho! Games freeze a lot of times on alt-tab, or bug... This saved me from hardrestart many times!


      My Computer


  2. Posts : 68,880
    64-bit Windows 11 Pro for Workstations
       #2

    You should be able to safely use any of the options below to kill a process as needed.

    Kill a Process in Windows 10

    Usually, you may need to be concerned about losing whatever the process is for since it's unresponsive and no way to save before killing it.
      My Computers


  3. Posts : 582
    Windows 10 Pro 64 bit 19044.1706
    Thread Starter
       #3

    Problem is you need to force kill it, otherwise it won't close, when it is not responsive. And I heard using taskkill is a bad thing to do from multiple sources...
    How to Close Firefox (or any program) at Command Line/Prompt • mozillaZine Forums
      My Computer


  4. Posts : 5,452
    Windows 11 Home
       #4

    https://docs.microsoft.com/en-us/win...mands/taskkill
    empleat said:
    However I read this is not a safe way to close process! It could mess up registry, or Windows, or program data!!!
      My Computer


  5. Posts : 1,255
    Windows 10 Pro
       #5

    A process that is marked "Not Responding" is one that is not waiting for input and had not responded to input for 5 seconds. That is often a temporary situation. The process may be busy and is temporarily unable to respond.

    The best way to terminate a process is to send it a close message and it will then close itself. This gives the process an opportunity flush file buffers, update registry entries, or do whatever is needed to clean up before closing. This is what happens when you click the "X" button in an application or use taskkill without the /f option. The problem is that if the process is not responding this will not work. And if it was responding you would have no need to terminate it. Many processes do not have a user interface and this cannot work.

    The last resort is to use taskkill or something that accomplishes the same thing. This is a rather brutal way to terminate a process. The OS kills the process which has no opportunity to do anything. This can lead to data loss. It will not corrupt the registry or fill system. Usually this will cause no harm. But "SAFE" is always a relative term.

    Using taskkill /f on a system process is generally a bad idea. Depending on the process you may loose system functionality or cause a system reboot. Some processes are so important that the system cannot run without them.

    From a system point of view these 2 are really the only generic ways to terminate a process. The other methods mentioned in post #2 are just different ways of accomplished the same thing.
      My Computer


  6. Posts : 582
    Windows 10 Pro 64 bit 19044.1706
    Thread Starter
       #6

    WTH?

    Not what 44k post user says LOOOOOOOL: How to Close Firefox (or any program) at Command Line/Prompt • mozillaZine Forums
    I read that from multiple sources...

    He says: closing forcibly program using taskkill can corrupt registry, any numbers of programs and files...

    LMiller7 said:
    From a system point of view these 2 are really the only generic ways to terminate a process. The other methods mentioned in post #2 are just different ways of accomplished the same thing.
    What do you mean by these 2? What about PowerShell cmdlet - Stop-Process?

    It is weird that there wouldn't be any way to close unresponsive program safely. Hardrestart can do the same, or worse than if you closed forcibly just one unresponsive program!
      My Computer


  7. Posts : 5,452
    Windows 11 Home
       #7

    empleat said:
    I read that from multiple sources...
    Maybe try trustful sources next time. If it was so dangerous, MS would have surely mentioned it. If you press reset on PC, it is pretty much the same, but bad for hardware, so taskkill is obviously a better choice. I use taskkill dozen times a day for years. But thank you for a good laugh.

    empleat said:
    He says: closing forcibly program using taskkill can corrupt registry, any numbers of programs and files...
    That might be under some extreme situations, like when you terminate a setup, you might not be able reinstall it or lets say you terminate office, then document you were working on will not be saved obviously. But we do not live in XP era, 10 can handle anything, even when PC loses a power during an upgrade.
      My Computer


  8. Posts : 582
    Windows 10 Pro 64 bit 19044.1706
    Thread Starter
       #8

    TairikuOkami said:
    Maybe try trustful sources next time. If it was so dangerous, MS would have surely mentioned it. If you press reset on PC, it is pretty much the same, but bad for hardware, so taskkill is obviously a better choice. I use taskkill dozen times a day for years. But thank you for a good laugh.
    Why do you think I asked the question you dumb....? Imagine you asking a question and someone said: I had a good laugh... So you never asked any questions in your life I take it? Maybe that's why you are so ignorant...

    batch file - Is taskkill safe to close a process? - Stack Overflow

    I read from power users on various forums it is not safe to do so...
      My Computer


  9. Posts : 5,326
    Windows 11 Pro 64-bit
       #9

    With this posted batch script you can terminate not responding processes.

    Code:
    @Echo Off
    Cls
    Echo ----------------------------------------------- > %userprofile%\Desktop\Report.txt
    Echo TASKLIST >> %userprofile%\Desktop\Report.txt
    
    Echo. >> %userprofile%\Desktop\Report.txt
    Tasklist /FI "STATUS eq NOT RESPONDING"  >> %userprofile%\Desktop\Report.txt
    Echo --------------------------------------------- >> %userprofile%\Desktop\Report.txt
    Echo. >> %userprofile%\Desktop\Report.txt
    Echo. >> %userprofile%\Desktop\Report.txt
    Echo ----------------------------------------------- >> %userprofile%\Desktop\Report.txt
    Echo TASKKILL >> %userprofile%\Desktop\Report.txt
    
    Echo. >> %userprofile%\Desktop\Report.txt
    Taskkill /FI "STATUS eq NOT RESPONDING" /T /F >> %userprofile%\Desktop\Report.txt
    Echo ----------------------------------------------- >> %userprofile%\Desktop\Report.txt
    exit
    Add Kill All Not Responding Tasks Context Menu in Windows.
      My Computer


  10. Posts : 582
    Windows 10 Pro 64 bit 19044.1706
    Thread Starter
       #10

    FreeBooter said:
    With this posted batch script you can terminate not responding processes. Add Kill All Not Responding Tasks Context Menu in Windows.
    This was not what I was asking at all. I know already about taskill, I Am looking for a better method!

    What about PS cmdlet - Stop-Process?
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 19:33.
Find Us




Windows 10 Forums