WAD 15.01.52 broke Windows 2003 SDK setenv.cmd

Jan 19, 2009
After upgrading to .52 the following errors are produced:

C:\program files\Microsoft SDKs\Windows\2003\setenv.cmd [148] Usage : IF [/I] [NOT] condition [.AND. | .OR. | .XOR. [NOT] condition ...] command
C:\program files\Microsoft SDKs\Windows\2003\setenv.cmd [158] Usage : FOR [/A:[[-][+]rhsdaecjot] /D /F ["options"] /H /I"text" /L /Nj /O:[-]adegnrstu /R [path] /T"..." /W] %var IN ([@]set | start, step, end) [DO] command ...

Line 148 is


and line 158 terminates:

For /F "delims=;" %%i IN ('%windir%\system32\Cmd.exe /c Ver') DO (
IF "%%i"=="Windows NT Version 4.0 " (
IF "%CPU%" == "IA64" goto ErrorUsage9x_IA64

I'm fairly sure the upgrade was from .51 to .52 but it could have been from .48 to .52. Is it possible to download 15.01.51 so I can verify? (x64)

Jan 19, 2009
Using BDEBUGGER to examine the parameters passed into setenv.cmd, it appears that any parameters with a leading slash are being modified similar to the following echo command:

[C:\]echo /2000

I hope this is a clue. I've tried toggling off "UNIX/Linux-style Paths" without a change in behavior.
Jan 19, 2009
I cannot reproduce the problem on another system. On the problem system all parameters with forward slashes are translated to double backslashes. For example, "LIST /S" attempts to process "LIST \\s" and fails to find a file by that name. "dir /s" attempts to process "dir \\s" and fails. It makes tcc.exe very difficult to use.

Any thoughts on how the command input could be captured and translated? How might I debug this situation?
Jan 19, 2009
Not reproducible here. Nothing has changed in the argument parsing in the last few builds.

I suspect this is local to your system (otherwise EVERYBODY would be complaining!). Are you running any plugins?

I'm not running any plug-ins that I am aware of or remember. Is there a command I can run to list take command plugins?

On this one system the substitution of all "/" with "\\" on each and every command line input is taking place:
  • TCC 64-bit 15.01
  • TCC 32-bit 15.01
  • TCC 64-bit 14.03.59
  • TCC 32-bit 12.11.76
The substitution does not occur if I run Cygwin bash, cmd, or powershell within Take Command.

I've either hit a very weird configuration bug or something is altering / filtering the command line input.

Of course, my systems have OpenAFS installed. The behavior is similar to what it would be if every parameter matched the AFS root.
In fact, that is indeed the problem. The TransarcAFSDaemon/Parameters "MountRoot" value was set to the empty string. So every parameter did have a matching AFS root prefix.
Jan 19, 2009
What are your aliases? Do you have PRE_INPUT or PRE_EXEC defined?

Scott, thanks for the reply. PRE_INPUT and PRE_EXEC are not set. Take Command has the ability to automatically translate command line parameters that are known to be AFS paths by matching the prefix of the path, /afs/your-file-system.com/public/openafs, to a value specified in the registry, /afs. If there is a match, the path will be transformed into a Windows UNC path \\AFS\your-file-system.com\public\openafs. With the "MountRoot" registry value set to the empty string, every parameter appeared to match the requisite prefix and was converted.


Scott Mintz
May 20, 2008
Solon, OH, USA
Ouch. Is that an OpenAFS setting or a TCMD.INI setting? Was this behavior changed in 52 or was it coincidental?
Jan 19, 2009
Its an openafs setting and I'm the developer of the OpenAFS Windows client. The bug was coincidental and quite bizarre.
Similar threads
Thread starter Title Forum Replies Date
V Everything broke … everything Support 3
thorntonpg windows 11 Support 12
vefatica Windows 10 themes Support 0
J Take command does not start on Windows 10 Support 3
D How to? Windows Key-Left and Windows Key-Right Support 9
Joe Caverly PYTHON from Microsoft Windows Store Support 2
D Open Windows 10 Photos app from command line Support 11
vefatica Windows Terminal ... Pop-up location Support 1
Joe Caverly Windows Terminal and @SELECT Support 13
vefatica Console popup windows don't work correctly Support 0
D Layout debugger windows Support 2
L LIST's pop-up search loses focus in a Windows Terminal window Support 15
nickles ANSI Colors Windows 7 no longer working Support 6
S Windows Server version not being detected correctly in TCMD 26RC2 Support 9
D Which is the latest version for Windows XP? Support 2
rconn News Windows 7 Support Support 0
Joe Caverly Windows Size is 80x0 Support 2
rconn Dropping Windows 7 support in Take Command / TCC v26 Support 8
G Taskbar Windows 10 Support 7
T Windows Terminal Support 2
Joe Caverly Windows Sensor Support 5
vefatica Windows 10 and line wrapping selection? Support 6
fishman@panix.com New Problem with later Windows 10 Support 10
CWBillow Upgrade Windows 10's effect on TCMD and TCC Support 3
T Take Command v21 on Windows Server Support 1
Bill de Haan "Sensitive Privilege Use" in Windows security auditing Support 7
Joe Caverly Create Windows Jobs and optionally attach processes to a job Support 17
Joe Caverly What version and Windows OS are you using? Support 3
A Windows 10 This app can't run on your PC Support 2
G 4NT on Windows 10 Support 3
vefatica Undesired scrolling in Windows 10 enhanced console. Support 2
vefatica Windows 10 version number? Support 6
vefatica How do I see Windows 10's ANSI in action? Support 3
A List windows with titles matching given pattern? Support 2
M New "pinned" attribute (since Windows 10 1709) Support 6
Emilio III TCMD Tab titles on Insider Windows Support 2
kb6ojs Want to start TCMD v20 with every Windows 10 bootup Support 3
E Cannot paste dollar sign into TCC on Windows 10 1803 Support 7
M TCC incorrect dir output since Windows 1803 Support 6
G Version 20.11 installed on Windows 10 problems Support 9
fishman@panix.com TCC v22 & the Windows 10 Console Support 5
Per TCC/LE 14 64-bit won't start on Windows 10 Insider Preview 17063 (171213) Support 12
I tcmd versus tcc in Windows 10 Support 2
Dick Johnson DrawBox now broken in Windows 10? Support 6
CWBillow Editing in the root directory of windows 10 Support 6
CWBillow Clearing out the Windows Temp folder Support 2
H New command not working well in Windows 7 Support 4
H _winver shows 6.1 on windows 7 Support 7
Joe Caverly Windows x64 Support 4
mscheuner TCMD 20 on Windows 10 - always loosing its settings Support 1

Similar threads