3

I'm running Windows 8.1 Pro and would like to know if it's possible to have a keyboard shortcut to run

taskkill /F /FI "STATUS eq NOT RESPONDING"

using CTRL + ALT + X

SIDE NOTE: I have currently have a work-around where I have a batch file (KillTask.bat) with the command and a desktop shortcut to KillTask.bat with the shortcut key set to CTRL + ALT + X.

Screenshot (Here's a link explaining the work-around)

Is there a more direct method of doing this by way of a keyboard shortcut without the use of desktop shortcuts and batch file?

Mwiza
  • 7,780
  • 3
  • 46
  • 42
mxrclxst
  • 132
  • 1
  • 2
  • 9
  • I don't think this is the right forum for this type of question. Try http://superuser.com/ – Jacob Sep 10 '14 at 22:29

1 Answers1

2

You dont need the .bat. You can do the following:

1. Create a shortcut and add the path:

C:\Windows\System32\cmd.exe /c taskkill /F /FI "STATUS eq NOT RESPONDING"

2. Got to the shortcut properties and put the shorctus key you want: CTRL + ALT + X.

And that's all. The only file you need is the shortcut.

The important thing here is that you execute cmd.exe with /c to specify the command you want to run.

EDIT: Thanks to eryksun!

Even better, we can just call taskkill directly:

C:\Windows\System32\taskkill.exe /F /FI "STATUS eq NOT RESPONDING"

But still, you need a shortcut file.

JosEduSol
  • 5,268
  • 3
  • 23
  • 31
  • Thank you! This is very helpful. I don't suppose the desktop shortcut could be done without completely? – mxrclxst Sep 10 '14 at 22:44
  • @mxrclxst I dont know if there is a shorter way. But there are better forums for this kind of questions, like: [superuser.com](http://superuser.com/). Good luck. – JosEduSol Sep 10 '14 at 22:49