How to? Shell Window remains open

Aug 3, 2012
5
0
I use TCC 14.02.42 x64 Windows 7 [Version 6.1.7601]

I use Thinkvantage Access Connections (TAC), a nice and handy tool from Lenovo to do some automation when switching the network (e.g. from home to office etc).

TAC can call a batch file when switching connections, but only a bat, not a btm. and it invokes it via CMD.EXE.And it cannot handle Parameters. Stupid, but ok.

So I call tac-test.bat with following content:

"C:\Program Files\JPSoft\TCMD14x64\tcc.exe" C:\Util\tac-test.btm
exit

tac-test.btm has following content:

START "Firefox" "C:\Program Files (x86)\Mozilla Firefox\firefox.exe"
DELAY 10
exit

There is one issue, and I think this is a new issue - I can't remember to have it seen half a year ago.

The problem is, that the tac-test.bat will not close on exit. Instead, it waits until I close Firefox. This is 100% reproducable for me. Interestingly, the icon in task bar of the bat changes.

I see the following output

>>> BEGIN
"C:\Program Files\JPSoft\TCMD14x64\tcc.exe" C:\Util\tac-test.btm

TCC 14.02.42 x64 Windows 7 [Version 6.1.7601]
Copyright 2012 JP Software Inc. All Rights Reserved
Registered to ***MASKED******* - 1 System License

START "Firefox" "C:\Program Files (x86)\Mozilla Firefox\firefox.exe"
DELAY 10
ACR (Component): component init
FoxyProxy Plus settingsDir: C:\Users\MASKED\AppData\Roaming\Mozilla\Firefox\Profiles\MASKED.default\foxyproxy.xml
exit
exit
>>> END


It seems to me like if firefox uses this window for some kind of output and prohibits the closing. This seems to be done by the START? How could I enforce the window to close?
 
Aug 3, 2012
5
0
Ok, could be an option.

Still, I'm interested in why the window keeps open after the START command?
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,461
88
Albuquerque, NM
prospero.unm.edu
Because recent versions of Firefox grab onto the console and won't let go. You'll see similar issues launching Firefox from CMD.EXE.

You might be able to give Firefox its very own console with something like this:
Code:
start /inv /pgm "%_cmdspec" /c firefox.exe

But if they don't get it sorted soon, I'm starting to think that the correct solution might be to ditch Firefox for Chrome or Opera or whatever. (Even recent versions of Internet Explorer seem more stable -- a sign of the apocalypse?)
 
Aug 3, 2012
5
0
That sounds valid - this means the change was not in TCC, but rather on Firefox side.

I'll test with your START idea and come back.
 
May 20, 2008
3,515
4
Elkridge, MD, USA
I just execute FIREFOX.LNK from a line in my TCC batch file, and never have the TCC instance remain alive solely because Firefox is still running. WinXP SP3 with all updates, Firefox 16.0.2. BTW, that batch file also loads SHRALIAS.EXE and populates the four TCC global tables (alias, directory history, function, history) as part of my user log-in, then terminates.
 
Oct 24, 2011
73
1
I don't know what the difference is, but I've seen none of these console-Firefox problems on Windows 7 x64 SP1.

I've always used START in a simple alias to call Firefox from the command line, as far back as XP:

start /pgm firefox​

When I enter the name of an HTML file on the command line, though, Firefox is called directly and I'm immediately returned to the command prompt. As expected, Firefox and the console run independently.
 
Similar threads
Thread starter Title Forum Replies Date
R How do I get a Git Bash shell to appear in TCC window? Support 7
James Miller tcc shell window does not disappear Support 18
CWBillow Power Shell in a TCMD window Support 5
A Problem with functions @int @decimal and identifying Powershell as a shell. Support 12
Joe Caverly CMDEBUG and New Shell Support 1
tmaynard Bug Typesafe Activator fails under Take Command shell Support 2
J Shell nesting level, and inherited environment variables Support 10
vefatica Starting shell objects Support 6
daniel347x Open a bash shell in Take Command? Support 2
A TC not visible after Shell restarts Support 3
R History window wrong size, can't remember size change Support 12
R @select inside alias gives different (insanely small) window Support 7
K_Meinhard How to? Help window position Support 7
D Directory History Window with wildcard search Support 3
Dmitry L. Kobyakov Documentation Error in the Help: the WINDOW command Support 0
L LIST's pop-up search loses focus in a Windows Terminal window Support 15
ntak About window size notification Support 6
R Batch Debugger Command Expansion Window Support 3
G Press on another Window Support 24
Peter Murschall IDE: After undocking the command expansion Window is offended Support 2
T TCC Window Background Color Anomaly Support 9
A v25 BC break in WINDOW and ACTIVATE Support 12
vefatica BTM, elevated, console window caption? Support 4
W Hide window Support 7
R How to? START program as top window? Support 2
P No linefeed on last line of console window Support 2
scottb How to? ipconfig output in current window Support 4
R How to? Change TCMD tab font size in window menu Support 3
T Fixed IDE locks up if edit window for running batch is closed Support 6
E How to change window title tcmd window - not tcc window Support 1
jaltman tcmd 21.0.19 win10 16179 console window loses content Support 2
B How to get window status of a running app Support 3
M Call History popup-window? Support 0
D How cut in TCC tab window Support 5
S Paste in TCC/TCMD window is very slow [v20.0.22] Support 13
C How to? Feed keys to firefox (Yahoo Mail) window Support 4
C How to? Feed keys to firefox (Yahoo Mail) window Support 0
C How to? run a BTM in elevated, inv tcc tab window Support 9
vefatica Ctrl-Enter in command history window? Support 8
D Take Command tab only uses half of window Support 1
vefatica TCC window caption in elevated session? Support 5
vefatica New File Explorer window Support 1
T 64 bit TCCLE appears to crash when opening tcc.exe from within tcc.exe window Support 7
D WAD TASKBAR window commands confuses our friends at MS Support 4
F EDIT FIELD in a popup window Support 2
samintz Flashing window Support 4
fpefpe How to? folder / explorer window Support 10
C Msg Popup window does not close Support 8
Jay Sage Failure of ACTIVATE to Set a Window Position Support 3
R Minor Cosmetic Issue in Take Command Window Support 2

Similar threads