Can you set a keyboard shortcut for Windows CMD command?
I am running Windows 8.1 Pro and would like to know if it is possible to have a keyboard shortcut to start
taskkill /F /FI "STATUS eq NOT RESPONDING"
using CTRL+ ALT+X
Note: I currently have a workflow where I have a batch file (KillTask.bat) using the command and a desktop shortcut for KillTask.bat using the CTRL+ ALT+ keyboard shortcut X.
Screenshot (Here's a link explaining the workaround)
Is there a more direct way to do this with a keyboard shortcut without using desktop shortcuts and batch file?
source to share
You don't need it .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. Get the properties of the shortcut and place the key shorctus, you want to: CTRL + ALT + X
.
And it's all. The only file you need is a shortcut.
What is important is what you run cmd.exe
with /c
to specify the command you want to run.
EDIT: Thanks eryksun!
Better yet, we can just call taskkill
directly:
C:\Windows\System32\taskkill.exe /F /FI "STATUS eq NOT RESPONDING"
But still you need a shortcut file.
source to share