This batchfile (any all others) will not exit after running when more than one are spawned.
I am an experienced MS-DOS/Windows/Java developer and I have never seen this behavior before. Something very strange is happening and I would appreciate a workaround or some clues please.
As an example, I have made a simple test bat script called hung.bat I am running on a Windows 8.1 (32bit) machine from either a command prompt or by clicking the file:
@ECHO OFF ECHO WELCOME TO HUNG pause ECHO HANGING UP EXIT (**does not matter if this line is blank or EXIT or GOTO:EOF **)
I enter each terminal and hit the key to continue. Then they all say 'HANGING UP'.
They will not close and exit when done if I have opened more than one. This happens when I am using 'start hung.bat' from a command prompt or clicking on the batchfile.
I made this simple batchfile to debug a server service problem we are also having -- the webserver uses a batchfile to get some data and when it has multiple sessions, they also stall and won't finish.
Seems to happen independent of file If I make two copies of the file hung1.bat and hung2.bat and I click once on each, then the same behaviour happens!
Different behaviour on home machine The batch script works on my home Windows machine (Windows 8.1 32-bit) but not on my work machine (also Windows 8.1 32-bit, licensed fresh windows 8.1 install). But still does not work on my work machine even if I am admin and run as admin.
I have even excluded files in that directory from Windows Defender.
Even stranger When I open two or more command windows (command or click three times), then the last one will work properly and close as expected. But if I click the first window (i.e last one loses focus), then go back to the last one, it no longer works properly either!
SETUP My home machine is Windows 8.1 32-bit, on an AMD Phenom II x4 CPU, with 3GB ram. My work machine is Windows 8.1 32-bit, on an INter Core-i5-4570 CPU, with 4.00 GB (3.32 usable) ram. Both machines just use Windows Defender. It happens even when Defender is turned off and DEP is on or off.
UPDATE We scanned the system with MalwareBytes and also had windows check the integrity of the files. Everything checked out as before and the problem still continues.