Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Simple Pipe Sequence Apparently Not Working

Borrowing an example from the 'PIPES' topic in TCC v35 help, I'm executing this command:
alias |sort |sert
I find this fails: TCC hangs. More accurately, it stops, apparently blocked by something. Hitting {Ctrl}+C cancels whatever the blockage is and returns me to the command prompt. However I would have expected this simple pipe-sequence to work without any issues. FWIW this did work, in the (old) TCC/LE v14.

Using "in-process" pipes works fine. Both of these succeed:
alias |!sort |!sort
alias |!sort |sort
Moreover, this also works:
alias |sort
So it appears the issue is somehow with TCC launching a new process for the second (or subsequent) pipe(s).

Oddly, I find that issuing:
alias |sort
and then immediately issuing a following command of:
alias |sort |sort
does sometimes work — one-time. This is intermittent and rare, but I have seen it twice (in all my experimentation), so it does happen from time to time. It's as if the first command "primes the system" somehow so that the second command succeeds — one-time. But this is not reliable/easily reproducible.

I cannot track down what is going wrong with using pipes this way. Can anyone offer any help?

TCC 35.00.21 x64 Windows 11 [Version 10.0.26100.7171]

Thanks
 
I'm assuming that's a simplified example to demonstrate a more complex issue. In which case, good for the OP.
 
Yes, it was just a simplified example @Eric Pement .

I have done further experiments, and I find that
alias |sort >foo.txt
also does not work, while
alias |!sort >foo.txt
does. Something is just not working with pipes, here.

I have now tried the same commands on two different computers and Windows systems, and TCC v35 fails on both:

Work system:
Dell laptop
Edition – Windows 11 Enterprise
Version – 24H2
Installed on – ‎2025-‎07-‎02
OS build – 26100.7171
Experience – Windows Feature Experience Pack 1000.26100.265.0

Home system:
Lenovo laptop
Edition – Windows 11 Pro
Version – 24H2
Installed on – ‎2025-‎05-‎04
OS build – 26100.7171
Experience – Windows Feature Experience Pack 1000.26100.265.0

Sorry to say, although I purchased TCC v35, I will now be rolling back to TCC/LE v14 since I cannot get pipes to work properly. Too many of my existing batch files and daily commands rely on pipes working for it to be viable to move to TCC.

I will keep tinkering from time to time, but this does not look like an easy problem to fix.

Thanks
 
Do you have a TCSTART.BTM? If you do, look it it for anything which could cause delays in the startup of transient instances.
 
Or more generally, you could start a new shell with tcc.exe /i and see whether you can reproduce your issue in that. If /I makes the problem go away, then most likely it's in TCStart, TCmd.ini, or a plugin.
 
Or more generally, you could start a new shell with tcc.exe /i and see whether you can reproduce your issue in that. If /I makes the problem go away, then most likely it's in TCStart, TCmd.ini, or a plugin.
... or an alias.
 
I read the advice long ago to add code at the beginning of TCSTART.BTM to exit immediately for non-interactive sessions. My file starts with code like this (actually a little more complicated for entirely personal reasons):

Code:
if %_pipe NE 0 quit
if %_transient NE 0 quit
if %_ide NE 0 quit
 
My TCSTART.BTM starts the same as does Jays, but as a one-liner;
Code:
@if %_pipe != 0 .or. %_transient != 0 .or. %_ide != 0 quit
Joe
 
Code:
if "%_pipe%%_transient%%_ide" ne "000" quit
... if you're feeling terse.
 
For things that don't have to be super speedy, I prefer readability and clarity to terseness, so I would have used Joe's version. However, I actually log all invocations of TCC, whether interactive or in pipes, etc. So I test each case separately and write the appropriate line to the log file.
 
Thanks everyone, for the suggestions above. I am trying them all.

In the meantime, I have installed each historical version of TCC from the Downloads page. I have discovered that all versions of TCC work properly from v25 to v33, inclusive. Starting with v34 and forward (so, to v35) things are busted in the way I described here. v33 is the last "working version".

⯈ Is it possible for me to downgrade my license to TCC v33, and just use that? I would be OK with it.

Additionally — FWIW — I find that doing a so-called "clean boot" in Windows (that is, using msconfig to disable all non-Microsoft services, and then disabling all 'Startup' items in Task Manager taskmgr.exe and doing a reboot), resolves my troubles with TCC v35. Disabling 'Startup' items alone, is not sufficient — non-MS services must also be disabled.

This points to v35 somehow interacting with some other service on my machine — a non-Microsoft one. But discovering what that is, and then "fixing" it somehow, seems like a forlorn hope.

Thanks
 
As Vince mentioned, piping problems are almost always caused by misconfigured TCSTART / TCEXIT files.
I am not using either of TCSTART.btm or TCEXIT.btm. Doing an "Everything" (service) search, shows there are no such files on my system.

However I do see tcmdbatch.btm, tcctabhere.btm, tcchere.btm, tccbatch.btm, tcmdhere.btm present. Might those potentially also be culprits? I shall investigate.

Also, if various TC*.btm files are the problem, I would have expected issues in TCC v33, but there are none. — However, I shall check nonetheless.

Thanks
 
Those BTMs are only used on demand. The *batch.btm ones make TCMD or TCC the default app for BTM files and the *here.btm ones create right-click Explorer context menu entries for starting TCMD or TCC in Explorer's current directory. None of them would affect pipes.
 
Thanks to everyone who replied here. I have solved my problem.

The issue had to do with two things:
  1. installation of TCC v35 not completing properly (hang during "removing backup files").
  2. (after successful installation) another application named "Windowblinds" interfering.
[1] TCC v35 was not able to install cleanly on my machine, until I did a so-called "clean boot" (in Windows 11), which I described in an earlier entry here in this post. In brief, use msconfig to disable all non-Microsoft services, then use taskmgr to disable all Startup programs, then reboot. This is a "clean boot" (ChatGPT has more details).

Without doing a clean boot, TCC v35 installer hangs at the point of "removing backup files…", when a (console) window opens in the background to finish registering various DLLs. If you force the console window closed, TCC may or may not work properly, depending on how far it got before the hang.

You can avoid all trouble by just installing TCC v35 after doing the clean boot. Once it's installed, you can re-enable the disabled services (msconfig) and re-enable the disabled Start programs (taskmgr) to go back to your regular boot. This works fine.

[2] In my case, the clean boot resolved the installation issue, but TCC v35 still would not work properly with sequences of pipes and/or redirects. The problem turned out to be an application called "Windowblinds" which I had installed on my system to try to make certain aspects of the Windows UI more usable.

I am an old man, and the font size in (for example) Windows Control Panel is fairly microscopic on a 4K high DPI monitor. It is annoying. The Windowblinds program allows UI elements like that to be reasonably customized, in particular to a larger font. That is why I had it installed.

However Windowblinds injects fairly aggressive hooks into the OS in order to make that work, and I've had problems in the past with it interfering with Windows Explorer, among other things. It wasn't clear how UI hooks like that would interfere with TCC pipes or redirects, but at any rate, disabling Windowblinds immediately fixed my TCC v35 issues.

So, fine. I can either not-use (uninstall) Windowblinds, or, add TCC.exe to the list of "exclusions" for the UI injection. Both of these work.

So that is the end of my saga. I appreciate the time and thought posters here put into helping me. Much appreciated.

Thanks
 
Thank you for posting your findings. Hopefully the next poor sod will discover your post before spending the same length of time chasing this issue down.
 
I suggest posting this issue to windowblinds support.
A simple desktop theming engine should not interact with such a basic system functionality.
 
Back
Top