10

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?

  • 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 4: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 6: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 3: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
9

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.

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.

  • 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 2:53
  • 1
    Hit "edit" under my answer, and you can see the markdown syntax. – EEAA Sep 22 '11 at 2: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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.