I just upgraded to Windows 10 for a few days and have this error. I'm really sure that my computer doesn't have any program that takes control of Ctrl + C. How do i solve this and back to normal killing process like ping -t ...
?
6 Answers
I had the same problem on Windows 10. Ctrl+BREAK worked for me.
-
1
-
2
-
One possibility is that you have changed the CMD (cmd.exe) defaults. To restore the defaults, right-click on the CMD window's title bar and choose "Defaults".
Although Ctrl+C works fine on my PC in normal mode, perhaps you have UAC disabled and need to run CMD in administrator mode in order for Ctrl+C to work. To run in CMD in administrator mode, click on "Search", type in "cmd", right-click on "Command Prompt (Desktop app)", and choose "Run as administrator".
-
2+1 for me it only works when running command prompt as administrator, even after disabling CTRL key shortcuts in the options... very inconvenient. Jan 9, 2016 at 17:09
-
@JoeSkeen I have posted a solution myself, would be good to see if this sorts the issue for you. Jun 27, 2017 at 15:03
-
CMD is running in admin mode. "Defaults" opens a window and "Enable Ctrl key shortcuts" is checked yet
Ctrl+c
doesn't kill it. I'm running OS10 v1909 b18363.592. A superuser answer suggestsright ctrl+c
and anotherctrl+break
. Has Microsoft changed the keys again?– J.MoneyFeb 10, 2020 at 0:43
Just ran into this issue myself. It seems that when I return to cmd and left click in the black screen, the window title is prefixed with "Select" as though I am trying to highlight text. The first CTRL + C kills the select mode and the second CTRL + C kills the process. If I right click the window or left click the title bar as opposed to the window itself I do not get the "Select" event and CTRL + C works first time.
I believe you can also disable quick editing and this effectively stops you from highlights thus solving the issue if highlighting text in cmd is of no importance to you, the second alternative is just right click the window to reselect it.
-
1Thank you so much, that helped me just then when I was pulling my hair out trying to figure out why Ctrl + C wouldn't stop the OpenRefine process, like their wiki explains it should! Double Ctrl + C does it.– straguMar 31, 2020 at 0:17
Beware that hitting [Ctrl]+[C] sends the prompt "Terminate batch job (Y/N)?" to STDOUT and the keypress ^C
to STDERR.
If you run a script with script.bat >out 2>err
you will never see the prompt. Prompt goes to out
and keypress goes to err
Try pressing [Ctrl]+[c], [Y], [Enter].
The Microsoft answer would be: Use Powershell. But it has the same problem ;-)
Another possible cause is if you start cmd.exe
with the start /b
command, since that disables Ctrl+C, as the help text for start.exe
says:
B Start application without creating a new window. The
application has ^C handling ignored. Unless the application
enables ^C processing, ^Break is the only way to interrupt
the application.
In my tests, I can't kill a start /b ping 8.8.8.8
with Ctrl+C. It looks like it's worked, because I see a prompt, but it's still pinging away in the background.
See this answer for how it was worked around in the Windows Terminal application.
-
Please do not post the same answer to multiple questions. If the same information really answers both questions, then one question (usually the newer one) should be closed as a duplicate of the other. You can indicate this by voting to close it as a duplicate or, if you don't have enough reputation for that, raise a flag to indicate that it's a duplicate. Otherwise tailor your answer to this question and don't just paste the same answer in multiple places.– DavidPostill ♦Aug 2, 2022 at 14:33
So here is what I did... MANY of you MUST right click and run as administrator.
I create a shortcut on my desktop, the target is CMD.
I right click the short cut, under properties I click ADVANCED on the shortcut tab.
Check the box that says "Run as administrator"
SOLVED.
I then moved the icon to my quicklaunch. Yes I have quicklaunch in Windows 10 b/c/ I am baller like that...
start
. For example:start ping -t ...
It launches the command in its own window, and you can close it without closing the command window you started in.