3

We use a batch file as a deployment script for installation of software in a new system. Quite often the batch script will randomly pause until a keypress is present (i.e. the console window is active and a physical key is pressed).

I'm just wondering if anyone has ever come across this? The pause happens at different stages and times while executing the script.

The code format is as below:

cd <folder1>
"Setup.exe"
cd..
cd <folder2>
"Setup.exe"
cd..
cd <folder3>
"Setup.exe"
cd..

...

I guess it's similar to this question. In my case, the batch script is the only substantial process running, otherwise the computer would sit idle.

Eryk Sun
  • 33,190
  • 5
  • 92
  • 111
  • 1
    Are you interacting with the console window? For example, clicking on the window with quick-edit mode enabled causes the console to block all I/O operations while the user selects text to copy to the clipboard. – Eryk Sun Jul 20 '17 at 12:17
  • while the cmd file is running, no not really. Steps are: double cmd (sit back and watch) – user8337977 Jul 20 '17 at 12:45
  • Do any of these setup.exe installers write to the console window? – Eryk Sun Jul 20 '17 at 12:53
  • nope, they are just standard installation image. Some are actually scripted hta to install windows and 3rd part msi – user8337977 Jul 20 '17 at 15:34
  • Well, often right clicks make the window pause. – Tim Anthony Jun 11 '20 at 17:17
  • I run a script each week which takes about 30 minutes to complete, and it often seemed to randomly pause until pressing a key. I didn't think I was interacting with the window at all, but low and behold, after disabling quick edit mode, the problem has never re-occurred. – Kit Johnson Jun 21 '22 at 15:04

0 Answers0