This behavior may be due to a feature of the Windows Command Prompt called Quick Edit Mode.
What is Quick Edit Mode?
This is an optional feature of Command Prompt which pauses the execution of the current program when you select text in the command prompt window. This was designed to make it easier to select text.
How can I tell if my application is stalled due to Quick Edit Mode?
The most clear indicator of when Quick Edit Mode has been engaged is that the title bar of the Command Prompt window changes.
For example, under normal operation the title bar of the Command Prompt window may say: "Command Prompt". When quick edit mode is engaged, the title changes to "Select Command Prompt". If you notice that your application has stalled and the title bar of the Command Prompt window has changed in this manner, your application is most likely stalled due to quick edit mode.
Simply press a key on the keyboard with the Command Prompt window focused to un-stall the application.
How can I prevent my application from stalling due to Quick Edit Mode?
Quick Edit mode can be easily disabled for a single Command Prompt window or for all future command Prompt WIndows. Refer to the following link for more information: