-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible to kill "not responding" apps? #134
Comments
Which version of Windows are you using? are-you running AltSnap Elevated? |
Well now I understand the problem, I will see what I can do. it seems quite hard because I cannot even get the handle to the window from the mouse cursor, so I am not sure it is even possible. |
Currently, I'm on Windows 11 21H2, I always run AltSnap as admin. I have an idea, try the Alt+Tab method. While holding down Alt, we can close the selected app by pressing Del. |
This would be great but unfortunately, this requires integration into the Alt+Tab window manager and this can be done only by Microsoft. What AltDrag does is simply manipulate windows from the outside using conventional Windows API. So what happens is that after 5 sec of unresponsiveness for an application the Explorer will hide the actual window and present a special Ghost window, that can be moved/minimized/closed by the user. Hence, I need to find a way to get the windows handle from the Ghost window information and the only thing I got is a modified window title... |
PS: Normally as soon as those 5 secs elapses, A simple Alt+F4 should propose to terminate the program, so I am not sure what the point would be? AltSnap can still be used to terminate programs that are hung but not detected or not yet detected by Windows. |
@Yarrio69 |
Does it appear when you hit the close button? |
Thanks for the details, the only thing I did not expect is to see the WM_NCHITTEST to 0, I will see if this is the reason. |
@RamonUnch I think I found the solution: https://winaero.com/kill-not-responding-tasks-windows-10/ We can terminate non-responding apps with This terminates ALL non-responding apps it finds, it's not very common to have more than one hung apps at the same time. The problem is if this |
Interesting indeed. The taskkill command is its own thing, it would not care about any blacklist, blacklist are internally handled by AltSnap. Windows is using a very simple heuristics to determine if a process is hung or not and this is quite risky in my opinion to launch this command line even at non admin level. Of course risky only if you get some running processes with unsaved data. I will see on how to implement this in AltSnap, it might come with a different keyboard shortcut or with a confirmation dialog... In the meantime maybe you can simply create a desktop shortcut with the command line (like described on winaero) and configure the keyboard shortcut so that it triggers on Ctrl+Shift+Alt+F4 or something. I mean this trick does not need AltSnap or any extra programs to be launched from a keyboard shortcut... |
Also even more important you can exclude some processes from the list with the IMAGENAME filter:
I could not test this, try by yourself. Add more processes if needed... |
Yep, it works. The .lnk Shortcut Key method has a delay before executing a command, so I used AutoHotkey instead, it's more effective and instant. Here's the AHK script
|
I will link this topic in the wiki and present your .ahk script. |
I've mentioned about SuperF4 not being able to kill the unresponsive app, forcing us to launch Task Manager to kill this process.
stefansundin/superf4#38
AltSnap can't do it too, I tried
Ctrl+Alt+F4
orAlt+(Left/Middle/Right)MouseButton
as "Kill program", does nothing...Would it be possible to terminate the unresponsive app process without Task Manager?
The text was updated successfully, but these errors were encountered: