Ctrl-C doesn’t work in RUNAS or MakeMeAdmin command shells


·        Use RunAs or MakeMeAdmin to get a CMD shell running in a different security context.

·        Run “DIR /A /S C:\” to list every file and folder on the C: drive. 

·        Try to stop the output with Ctrl-C. 



Nothing happens.  “DIR” continues to execute.



Use Ctrl-Break instead.


[Added, March 9, 2005:

While this problem occurs on Windows XP, it does not occur on Server 2003 RTM!


Comments (24)

  1. Centaur says:

    Oh yes… Stepped on that. Most annoying when a program such as ping or wget has alternate semantics on Ctrl+Break.

  2. David Wright says:

    I recently discovered this also whilst doing a ping -t. The problem there is CTRL-BREAK doesn’t break out of the ping but just shows the ping stats. Haven’t worked out how to sort that one yet.

  3. Aaron Margosis has posted four more columns with LUA Tips and Tricks on his

  4. Adam says:

    This was something I bugged with Microsoft a long time ago. Nice that it is still around.

  5. call doctor says:

    reboot as 14997987. enter in to runas

  6. "call doctor", what does your comment mean?

  7. Numy says:

    If anyone happens to discover the cure for CTRL-C or CTRL-BREAK when doing a ping -t that would be great. Obviously closing the window is an option but for some of us "effcient" folk it would be nice to keep that window.

  8. Yeah, I’m trying to find out. What I do is to kill the "ping.exe" process through Task Manager / Process Explorer.

  9. Numy says:

    Hah, nice one. That makes way too much sense.

  10. Found the reason for Ctrl-Break doing what it does – it is by design. See KB article 325487 ("How to troubleshoot network connectivity problems"), http://support.microsoft.com/?id=325487 quoted here:

    "To watch Ping statistics, use the ping -t command. To see statistics and continue, press CTRL+BREAK. To stop, press CTRL+C."

  11. Numy says:

    Nice find. So it looks like a kill of ping is about the only route given our inability to use CTRL-C through an RunAs Shell. Interesting problem though… Still makes me want to understand why CTRL-C doesn’t respond.

  12. Couple of quick comments:

    1. I just added a note that this is not a problem in Server, only in XP.

    2. Another workaround for the "ping -t" problem is that you don’t need runas to run "ping -t" — you can run it as the originally logged-on-user. Normal users can send ICMP packets just like admins!


  13. Numy says:

    Good confirmation re: XP

    That’s a valid point re: non-admin ping. I’ll just have to start a little shock treatment to alter my behavior. 😉

    Thanks for the follow up!

  14. tonyso says:

    If you have not read Jen’s article on LUA, you should be asking yourself why not?

    This article…

  15. Complete list of Aaron Margosis’ non-admin / least privilege posts, for easy lookup.

  16. tonyso says:

    Get your friends and family, all those folks that come to you for computer help once their machines have…

  17. Leviathan says:

    Find a solution…

    Just Press CTRL+Shift+C for having a C instead of a c

    CTRL+c –> don’t work if capslock not engage

    CTRL+C –> work

  18. Leviathan, did you actually try that "solution" before you posted it? It doesn’t work.

  19. Ross Presser says:

    Another choice is to run a different ping utility, like the one from <a href="http://www.cygwin.com">Cygwin</a&gt;, or the excellent <a href="http://www.d3tr.de/">3d Traceroute</a>. I suppose I should wash my mouth out with soap now though, for suggesting a non-Microsoft, non-MSI, non-digitally-signed bit of software? *grin*

  20. Ross Presser says:

    Sigh .. didn’t realize HTML was verboten.

    Cygwin: http://www.cygwin.com

    3d Traceroute: http://www.d3tr.de/

  21. Gina says:

    I cant get that one to work either

  22. sba says:

    Now I hit an entirely different issue: my Dell laptop has NO Pause/Attn key, so I can’t break scripts running in a RUNAS’ed shell AT ALL…

    Any idea?

  23. Joeviocoe says:


    Type “Command” before the “pint -t”


    This opens the older shell that in not affected by the bug.

    [Aaron Margosis]  Joeviocoe, did you actually try that?  It doesn’t work on an XP system I tried it on.