Welcome!

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

SignUp Now!

WAD Apparently a bug when expanding environment variable %ProgramFiles(x86)

Oct
19
0
There seems to be a bug on Take Command/TCC when expanding the environment variable %ProgramFiles(x86). While Windows Command Prompt correctly expands it to:
"C:\Program Files (x86)" (in my system), Take Command/TCC removed the space between "Files" and "(x86)", thus rendering an invalid directory name on 64-Bit Windows systems. Please see screens below.

I am running Windows 7 Ultimate SP1.

Take Command.jpg
Command Prompt.jpg
 
This issue has been previously reported, and - IIRC - is caused by Win7 using invalid syntax (i.e., one that cannot be used in earlier versions of MS Windows) for the name of the environment variable - to wit, the parentheses. Use either %@shfolder[42] or %[ProgramFiles(x86)] - both work correctly. Search this forum to locate the older thread.
 
There seems to be a bug on Take Command/TCC when expanding the environment variable %ProgramFiles(x86). While Windows Command Prompt correctly expands it to:
"C:\Program Files (x86)" (in my system), Take Command/TCC removed the space between "Files" and "(x86)", thus rendering an invalid directory name on 64-Bit Windows systems. Please see screens below.

TCC didn't remove the space, it expanded "ProgramFiles" and appended the (non-variable-name) "(x86)" to the end.

Since TCC supports a single leading % (CMD doesn't, except sometimes in FOR) it has to break when it thinks the next character isn't likely to be part of a variable name. If you want the CMD behavior of requiring enclosing %'s around a variable, you can set "CMDVariables=Yes" in your TCMD.INI initialization file (in the "[4NT]" section).
 

Similar threads

Back
Top