16

I've just had two occurrences of windows 7 stalling an execution until I hit enter on the command prompt/powershell. Afterward execution seems to continue as expected.

First was an batch file of copy commands like

copy //host/file2010-1*xml localfolder/01/
copy //host/file 2010-2*xml localfolder/02/

One file seemed to be taking ages. I checked the folder and it was complete, hit enter and suddenly it burst back into life to get the rest.

Second is a java program (an ETL job) in powershell which paused as it was about to output SQL duplicate key warnings. I cannot confirm if actual execution stalled but I suspect not. I have just repeated this one as I type.

Also my more experienced colleague has seen the same thing with .net programs he has written.

How can I avoid this? What am I missing? Does Windows get lonely and need a gentle push?

KCD
  • 878
  • 3
  • 11
  • 23
  • 2
    edit the settings om the command shell that you've opened up its been set to quick edit mode which you don't want in this case. – tony roth Sep 22 '11 at 04:31
  • @tonyroth want to make that an answer so I can accept it. I doubt anyone knows why the copy task would've stalled. – KCD Sep 23 '11 at 06:45
  • 1
    It stalled because you clicked on the window and the command prompt / powershell window switched to select mode. What tony roth said *is* why it would've stalled - and what to do about it. – TessellatingHeckler Sep 24 '11 at 03:35
  • @TessellatingHeckler quick edit stalled both the command prompt output and the underlying task it was executing? Ok. I presumed quick edit to be a display only thing but I'm happy that is the complete answer. – KCD Sep 26 '11 at 21:37

3 Answers3

15

edit the settings on the command shell that you've opened up its been set to quick edit mode which you don't want in this case.

tony roth
  • 3,844
  • 17
  • 14
  • In case that you disable quick-edit mode, just use `Ctrl + m` if you need to select something. – m3nda Aug 04 '20 at 12:37
2

I have seen this with Powershell several times when focus was removed from the Powershell window. Perhaps that's what's happening here as well? Every time it happened things would spring back to life after the window re-gained focus and I hit Enter.

EEAA
  • 108,414
  • 18
  • 172
  • 242
  • 1
    Good to know it isn't just me but the bigger concern is how the batch file wasn't executing. Also how did you get the Enter key I haven't seen that in the comment formatting help? – KCD Sep 22 '11 at 02:53
  • 2
    Hit "edit" under my answer, and you can see the markdown syntax. – EEAA Sep 22 '11 at 02:55
0

I changed the line where i call the program to:

start /hight <path-to-program> <params>

This means to start program in hight priority. It is much faster and it does not require you to press any keys during execution

Matej J
  • 101
  • 1
  • Can't edit 1 char. Please correct `/hight` to `/high`. Also, why would run a process in high priority change the select mode behavior? – m3nda Aug 04 '20 at 12:19