What are the TCC settings that will allow maximum cmd.exe compatibility?

Jan 14, 2011
1
0
I am trying to use TCC with a legacy build system that is loosely based on the windows driver sdk. Everything we do inside our build environment is done through batch files. Even the simplest source code control commands are wrapped with batch files. Some of the batch files are extremely long and complicated. The batch file run at the start to initialize the environment is several hundred lines long.

These batch files all run fine under cmd.exe on all of the still supported versions of windows. But when I try to run them in TCC I get several errors. Most of them are about unbalanced parentheses and other mismatch characters. I have played a little with the SETDO command and the CMDvariables setting. But I have had no luck in getting any of our batch files / cmds to run successfully under tcc.

Is there a guide or tutorial on setting up TCC for maximum cmd.exe compatibility?

Thanks,

Jeff
 

rconn

Administrator
Staff member
May 14, 2008
12,356
150
Assuming you're running the current version (13.06), there are only a handful you need to worry about.

Enable these three options:
OPTION / Startup / Duplicate CMD.EXE bugs (This is the default, and tells TCC to duplicate two bugs in CMD's IF command parsing.)
OPTION / Startup / CMD.EXE delayed expansion (If you have this startup option set for your CMD.)
OPTION / Startup / Search for SFNs (Not recommended unless you want some potentially unpleasant results when you're copying, moving, or deleting files, but it *is* how CMD does it.)

and set "CMDVariables=YES" in your .INI file. (This means you won't be able to run any batch files written for TCC/LE, which only requires a single leading % for variables. But if you want near-100% compatibility with CMD ...)

If you want to get that last fraction of CMD compatibility and don't mind removing most of the TCC/LE features, you could also disable all of the TCC/LE commands that aren't in CMD. (Otherwise, TCC/LE might find an internal command name match while CMD would find an external app.) And maybe "SETDOS /X279" to disable nested aliases, quoting, and include lists. Disable global aliases and history. Turn off ANSI support (OPTION / Windows / Colors). Turn off pseudovariable expansion (OPTION / Advanced / Special Characters). Disable deleting to the recycle bin (OPTION / Startup).

If you want CMD-style command line editing (i.e., practically none), you can remove most of the TCC/LE command line editing features (OPTION / Command Line).
 
Mar 26, 2013
13
0
Is there anyway you can disable an internal command such that it falls back to the CMD command? I tried this with setdos /I-pushd and it simply fails to recognize pushd after that
 
May 20, 2008
3,515
4
Elkridge, MD, USA
WAD. No, CMD compatibility is NOT a fall-back option. But if CMD uses an external program to perform one of "its own" commands (if it is an external, it is not really CMD's command!), disabling the corresponding TCC command with SETDOS should execute the same external (assuming your PATH is appropriate).
 
Mar 26, 2013
13
0
Thanks again Steve.
It's a shame I have to say. I've wasted too much time in the past 2 days trying to work around the differences between the CMD and TCC/LE versions of PUSHD/DIRS. I can even make do with DIRS instead of the CMD behaviour of PUSHD if only it would list dirs in the same order as CMD PUSHD (no-args).

It's frustrating that TCC would have a different implementation and no way to behave compatibly.

Then again, I suspect TCC (which I've been using since it was 4DOS) had PUSHD long before CMD, so it's hardly responsible. Still it would be great to have an update where as a general rule all TCC commands for which there are _builtin_ CMD commands had a compatibility mode argument that could make them work like the _current_ version of CMD (and, yeah I know that's a moving target, so its not easy). The external windows commands, like you say, are not such a big deal, because you can use setdos to disable the TCC version.
 
Aug 23, 2010
637
9
If you want CMD.EXE compatibility, why do you use a different software to begin with?…
CMD.EXE is rich in its own right. If you know how to work around its deficiency, of course.
For last four years I was writing new (CMD) and rewriting old (4NT converting to CMD) scripts and I came across major incompatibity of TCC in the parameter parsing.
If you write a script with alot of parameter expansion and subroutine calls, be prepared that it may(or rather will) not work in CMD.
 

smf

Aug 3, 2015
10
0
Assuming you're running the current version (13.06), there are only a handful you need to worry about.

You should also add enable UNIX/Linux-style paths to the list of cmd compatibility settings.

If you want CMD.EXE compatibility, why do you use a different software to begin with?…

I have used TCCLE for years, I had a license to 4NT before that, 4DOS before that and NDOS before that. I work on projects that are cross platform, but everyone else using windows either uses cmd or cmder. I want CMD compatibility plus all the extras that I've gotten used to without switching between different shells. I can live without CMD bugs that are not replicated, as long as they aren't the only way to achieve functionality that others may rely on.
 
Similar threads
Thread starter Title Forum Replies Date
Jesse Heines Request for TCC Date Command Custom Format Example TCC/LE Support 4
P TCC LE crashes without any info after recent windows updates TCC/LE Support 3
V TCC LE doesn't expand %~ff correctly TCC/LE Support 5
A vcvarsall.bat command not working on TCC LE command prompt TCC/LE Support 16
M DEBUG dialogs from TCC TCC/LE Support 1
Captain'Flam False condition in IF force loop exit (TCC/LE 14 64bits) TCC/LE Support 3
M How to get the number of chars, which fit in the currently displayed TCC-window? TCC/LE Support 3
M TCC/LE works with Windows Insider Skip Ahead Build 17618 TCC/LE Support 1
D Bug with TCC/LE and volumes mounted under directories TCC/LE Support 5
B Error in TCC/LE when succeed smoothly in native windows cmd.exe TCC/LE Support 6
A TCC/LE x64 no longer works with Windows 10 Insider Preview Build 17063 TCC/LE Support 7
adam_0 TCC/LE string replacement differing from cmd.exe TCC/LE Support 3
D Incorrect icon for TCC/LE prompt here, Windows 10 TCC/LE Support 5
B Run TCC without interactive logon TCC/LE Support 0
T WAD option /u on TCC LE 13.06.77 TCC/LE Support 2
B Copy command to set timestamp not working in TCC/LE TCC/LE Support 5
R WAD TCC/LE does not set %_ffind_files TCC/LE Support 1
P Window width TCC TCC/LE Support 3
A installer for latest tcc/le isn't working TCC/LE Support 0
M Any plans for an updated TCC/LE version TCC/LE Support 16
miXza-81 Fixed There is Batch breaking bug in TCC LE (x64) TCC/LE Support 9
M Getting started with TCC/LE TCC/LE Support 3
John A TCC/LE not finding files in the c:\windows\system32\ directory? TCC/LE Support 4
Tim Rowe How to? TCC/LE colour not working with RSpec TCC/LE Support 14
R converting from NT to TCC/LE TCC/LE Support 3
jbanaszczyk [Q] How to retrieve / set current TCC/LE language TCC/LE Support 1
T C# Process.Start() never ends when starting TCC/LE process? TCC/LE Support 5
R WAD TCC LE pipe fails TCC/LE Support 6
M TCC LE x64 13.0 crash in Win 8 Pro 64-bit TCC/LE Support 0
A ftp on tcc/le TCC/LE Support 2
R TCC/LE attrib +/- C? TCC/LE Support 6
S Just wondering what TCC/LE 13.05.68 fixed TCC/LE Support 1
R TCC/LE steals the .btm association? TCC/LE Support 1
S Fixed TCC-LE 13.05.65 x64 "option" command tabs broken TCC/LE Support 4
rconn News TCC/LE 13.05 Released TCC/LE Support 0
F WAD Different value for %~dpfsI in TCC/LE TCC/LE Support 2
Charles Dye ? command, TCC/LE vs. supported TCC/LE Support 3
B TCC/LE prompt here TCC/LE Support 1
G Pin TCC/LE to task bar and start menu TCC/LE Support 6
jason404 A particular program that I like to use no longer works in TCC/LE TCC/LE Support 25
rconn News TCC/LE 13.04.56 Released TCC/LE Support 0
rconn News TCC/LE 13.04.55 Released TCC/LE Support 0
F Problem with TCC window colors TCC/LE Support 3
rconn News TCC/LE Version 13.03.45 Released TCC/LE Support 0
mfarah Things from the full TCC that I'd like to see in TCC/LE. TCC/LE Support 7
N how to terminate tcc/le using /h TCC/LE Support 15
rconn News TCC/LE Version 13.03.40 Released TCC/LE Support 0
rconn News TCC/LE 13.03.39 Released TCC/LE Support 0
R How to? Add TCC Open command box here to context menu TCC/LE Support 2
rconn News TCC/LE 13.03.38 Released TCC/LE Support 0

Similar threads