How to fix the Unknown Command error caused by starting CmdInit.cmd using TCC/LE?
When you attempt to start the TCC/LE console via executing TCC.exe
from ConEmu alongside the cmdInit.cmd
script, you get this error:
TCC: C:[...]ConEmucmdInit.cmd
[8] Unknown command "C:WINDOWSsystem32find.exe Windows"
How do you prevent this error and fix any issues related to initializing the ConEmu prompt from TCC/LE?
console conemu
New contributor
add a comment |
When you attempt to start the TCC/LE console via executing TCC.exe
from ConEmu alongside the cmdInit.cmd
script, you get this error:
TCC: C:[...]ConEmucmdInit.cmd
[8] Unknown command "C:WINDOWSsystem32find.exe Windows"
How do you prevent this error and fix any issues related to initializing the ConEmu prompt from TCC/LE?
console conemu
New contributor
add a comment |
When you attempt to start the TCC/LE console via executing TCC.exe
from ConEmu alongside the cmdInit.cmd
script, you get this error:
TCC: C:[...]ConEmucmdInit.cmd
[8] Unknown command "C:WINDOWSsystem32find.exe Windows"
How do you prevent this error and fix any issues related to initializing the ConEmu prompt from TCC/LE?
console conemu
New contributor
When you attempt to start the TCC/LE console via executing TCC.exe
from ConEmu alongside the cmdInit.cmd
script, you get this error:
TCC: C:[...]ConEmucmdInit.cmd
[8] Unknown command "C:WINDOWSsystem32find.exe Windows"
How do you prevent this error and fix any issues related to initializing the ConEmu prompt from TCC/LE?
console conemu
console conemu
New contributor
New contributor
New contributor
asked 4 hours ago
Emily MabreyEmily Mabrey
1264
1264
New contributor
New contributor
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
The Unknown Command Error
That error is related to this line of the ConEmu cmdInit.cmd:
cmd /d /c ver | "%windir%system32find.exe" "Windows"
TCC/LE is mangling the command, and actually ends up executing this:
cmd /d /c ver | "%windir%system32find.exe Windows"
That modified version is an invalid command, and that is why we get an error. Fixing this is as easy as making TCC/LE aware that we don't want it to "helpfully" auto-concatenate our strings using the following replacement command:
cmd /d /c ver | %@QUOTE[%windir%system32find.exe] "Windows"
This fix uses the @QUOTE command to add double quotes to the file path only if needed. In a standard installation of Windows there will not be any spaces in the path to find.exe
, so now we don't need the quotes and TCC/LE won't ruin our command by combining things.
Incorrect Windows Version Information
Unfortunately for the pickier people like myself, there is an additional problem on Windows 10 with the default TCC/LE prompt. TCC/LE thinks that all Windows version strings begin with "6.3." (I believe older Windows versions used to be versioned this way), leading it to print the following initial prompt once you fix the above error:
TCC LE 14.00.9 x64 Windows 10 [Version 6.3.17763]
Copyright 2016 JP Software Inc. All Rights Reserved
Microsoft Windows [Version 10.0.17763.346]
emily@EMILY-LAPTOP C:Usersemily
$
I find this printing of two different Windows versions for the same machine to be extremely annoying, so I developed an additional fix for this bug that makes additional modifications to the cmdInit.cmd
script. That fix is to replace the fixed version of the default command with this more extensively modified command:
cls &^
echos TCC LE %_4VER%.%_BUILD% %@IF["%_X64%" == "1",x64,x86]` `&^
cmd /d /c ver | %@QUOTE[%windir%system32find.exe] "Windows"
This command erases the original incorrect prompt before replacing it with a prompt that includes the TCC/LE version information (using TCC/LE internal variables) as well as the correct windows version. Additionally, the fixed version continues to correctly print out the processor architecture (x86 or x64) and includes the same lopsided spacing as the original (there are two spaces before and after 14.00.9 x64
, but there is an additional space afterwards, leading to 2 spaces before and 3 spaces after). The fixed version with support for Windows 10 prints the following output when run (your machine's specific versions and processor arch may differ):
TCC LE 14.00.9 x64 Microsoft Windows [Version 10.0.17763.346]
emily@EMILY-LAPTOP C:Usersemily
$
Drop-in Fix
Here is a final copy/paste version of the fix with comments which you can use use as a copy/paste drop-in:
rem Simple "ver" prints empty line before Windows version
rem Use this construction to print just a version info
rem cmd /d /c ver | "%windir%system32find.exe" "Windows"
rem This is a fixed version of the original version printout for TCC/LE
rem cmd /d /c ver | %@QUOTE[%windir%system32find.exe] "Windows"
rem This is a fully fixed version which prints out the correct
rem version string for the Windows installation
cls & echos TCC LE %_4VER%.%_BUILD% %@IF["%_X64%" == "1",x64,x86]` `& cmd /d /c ver | %@QUOTE[%windir%system32find.exe] "Windows"
Remember to make a copy of cmdInit.cmd
(perhaps cmdInitTCC.cmd
), point your ConEmu tasks for TCC/LE at the edited copy of cmdInit.cmd
. If you edit cmdInit.cmd
directly, the next time you update ConEmu it will clobber your modifications (there is a warning at the top of the script). I am using this following command to start TCC/LE from ConEmu using a copy named cmdInitTCC.cmd
: %ConEmuDrive%ProgrammingLinkstcc_le-x64tcc.exe /k %ConEmuBaseDir%cmdInitTCC.cmd" -new_console:d:%USERPROFILE%
New contributor
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Emily Mabrey is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1413230%2fhow-to-fix-the-unknown-command-error-caused-by-starting-cmdinit-cmd-using-tcc-le%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The Unknown Command Error
That error is related to this line of the ConEmu cmdInit.cmd:
cmd /d /c ver | "%windir%system32find.exe" "Windows"
TCC/LE is mangling the command, and actually ends up executing this:
cmd /d /c ver | "%windir%system32find.exe Windows"
That modified version is an invalid command, and that is why we get an error. Fixing this is as easy as making TCC/LE aware that we don't want it to "helpfully" auto-concatenate our strings using the following replacement command:
cmd /d /c ver | %@QUOTE[%windir%system32find.exe] "Windows"
This fix uses the @QUOTE command to add double quotes to the file path only if needed. In a standard installation of Windows there will not be any spaces in the path to find.exe
, so now we don't need the quotes and TCC/LE won't ruin our command by combining things.
Incorrect Windows Version Information
Unfortunately for the pickier people like myself, there is an additional problem on Windows 10 with the default TCC/LE prompt. TCC/LE thinks that all Windows version strings begin with "6.3." (I believe older Windows versions used to be versioned this way), leading it to print the following initial prompt once you fix the above error:
TCC LE 14.00.9 x64 Windows 10 [Version 6.3.17763]
Copyright 2016 JP Software Inc. All Rights Reserved
Microsoft Windows [Version 10.0.17763.346]
emily@EMILY-LAPTOP C:Usersemily
$
I find this printing of two different Windows versions for the same machine to be extremely annoying, so I developed an additional fix for this bug that makes additional modifications to the cmdInit.cmd
script. That fix is to replace the fixed version of the default command with this more extensively modified command:
cls &^
echos TCC LE %_4VER%.%_BUILD% %@IF["%_X64%" == "1",x64,x86]` `&^
cmd /d /c ver | %@QUOTE[%windir%system32find.exe] "Windows"
This command erases the original incorrect prompt before replacing it with a prompt that includes the TCC/LE version information (using TCC/LE internal variables) as well as the correct windows version. Additionally, the fixed version continues to correctly print out the processor architecture (x86 or x64) and includes the same lopsided spacing as the original (there are two spaces before and after 14.00.9 x64
, but there is an additional space afterwards, leading to 2 spaces before and 3 spaces after). The fixed version with support for Windows 10 prints the following output when run (your machine's specific versions and processor arch may differ):
TCC LE 14.00.9 x64 Microsoft Windows [Version 10.0.17763.346]
emily@EMILY-LAPTOP C:Usersemily
$
Drop-in Fix
Here is a final copy/paste version of the fix with comments which you can use use as a copy/paste drop-in:
rem Simple "ver" prints empty line before Windows version
rem Use this construction to print just a version info
rem cmd /d /c ver | "%windir%system32find.exe" "Windows"
rem This is a fixed version of the original version printout for TCC/LE
rem cmd /d /c ver | %@QUOTE[%windir%system32find.exe] "Windows"
rem This is a fully fixed version which prints out the correct
rem version string for the Windows installation
cls & echos TCC LE %_4VER%.%_BUILD% %@IF["%_X64%" == "1",x64,x86]` `& cmd /d /c ver | %@QUOTE[%windir%system32find.exe] "Windows"
Remember to make a copy of cmdInit.cmd
(perhaps cmdInitTCC.cmd
), point your ConEmu tasks for TCC/LE at the edited copy of cmdInit.cmd
. If you edit cmdInit.cmd
directly, the next time you update ConEmu it will clobber your modifications (there is a warning at the top of the script). I am using this following command to start TCC/LE from ConEmu using a copy named cmdInitTCC.cmd
: %ConEmuDrive%ProgrammingLinkstcc_le-x64tcc.exe /k %ConEmuBaseDir%cmdInitTCC.cmd" -new_console:d:%USERPROFILE%
New contributor
add a comment |
The Unknown Command Error
That error is related to this line of the ConEmu cmdInit.cmd:
cmd /d /c ver | "%windir%system32find.exe" "Windows"
TCC/LE is mangling the command, and actually ends up executing this:
cmd /d /c ver | "%windir%system32find.exe Windows"
That modified version is an invalid command, and that is why we get an error. Fixing this is as easy as making TCC/LE aware that we don't want it to "helpfully" auto-concatenate our strings using the following replacement command:
cmd /d /c ver | %@QUOTE[%windir%system32find.exe] "Windows"
This fix uses the @QUOTE command to add double quotes to the file path only if needed. In a standard installation of Windows there will not be any spaces in the path to find.exe
, so now we don't need the quotes and TCC/LE won't ruin our command by combining things.
Incorrect Windows Version Information
Unfortunately for the pickier people like myself, there is an additional problem on Windows 10 with the default TCC/LE prompt. TCC/LE thinks that all Windows version strings begin with "6.3." (I believe older Windows versions used to be versioned this way), leading it to print the following initial prompt once you fix the above error:
TCC LE 14.00.9 x64 Windows 10 [Version 6.3.17763]
Copyright 2016 JP Software Inc. All Rights Reserved
Microsoft Windows [Version 10.0.17763.346]
emily@EMILY-LAPTOP C:Usersemily
$
I find this printing of two different Windows versions for the same machine to be extremely annoying, so I developed an additional fix for this bug that makes additional modifications to the cmdInit.cmd
script. That fix is to replace the fixed version of the default command with this more extensively modified command:
cls &^
echos TCC LE %_4VER%.%_BUILD% %@IF["%_X64%" == "1",x64,x86]` `&^
cmd /d /c ver | %@QUOTE[%windir%system32find.exe] "Windows"
This command erases the original incorrect prompt before replacing it with a prompt that includes the TCC/LE version information (using TCC/LE internal variables) as well as the correct windows version. Additionally, the fixed version continues to correctly print out the processor architecture (x86 or x64) and includes the same lopsided spacing as the original (there are two spaces before and after 14.00.9 x64
, but there is an additional space afterwards, leading to 2 spaces before and 3 spaces after). The fixed version with support for Windows 10 prints the following output when run (your machine's specific versions and processor arch may differ):
TCC LE 14.00.9 x64 Microsoft Windows [Version 10.0.17763.346]
emily@EMILY-LAPTOP C:Usersemily
$
Drop-in Fix
Here is a final copy/paste version of the fix with comments which you can use use as a copy/paste drop-in:
rem Simple "ver" prints empty line before Windows version
rem Use this construction to print just a version info
rem cmd /d /c ver | "%windir%system32find.exe" "Windows"
rem This is a fixed version of the original version printout for TCC/LE
rem cmd /d /c ver | %@QUOTE[%windir%system32find.exe] "Windows"
rem This is a fully fixed version which prints out the correct
rem version string for the Windows installation
cls & echos TCC LE %_4VER%.%_BUILD% %@IF["%_X64%" == "1",x64,x86]` `& cmd /d /c ver | %@QUOTE[%windir%system32find.exe] "Windows"
Remember to make a copy of cmdInit.cmd
(perhaps cmdInitTCC.cmd
), point your ConEmu tasks for TCC/LE at the edited copy of cmdInit.cmd
. If you edit cmdInit.cmd
directly, the next time you update ConEmu it will clobber your modifications (there is a warning at the top of the script). I am using this following command to start TCC/LE from ConEmu using a copy named cmdInitTCC.cmd
: %ConEmuDrive%ProgrammingLinkstcc_le-x64tcc.exe /k %ConEmuBaseDir%cmdInitTCC.cmd" -new_console:d:%USERPROFILE%
New contributor
add a comment |
The Unknown Command Error
That error is related to this line of the ConEmu cmdInit.cmd:
cmd /d /c ver | "%windir%system32find.exe" "Windows"
TCC/LE is mangling the command, and actually ends up executing this:
cmd /d /c ver | "%windir%system32find.exe Windows"
That modified version is an invalid command, and that is why we get an error. Fixing this is as easy as making TCC/LE aware that we don't want it to "helpfully" auto-concatenate our strings using the following replacement command:
cmd /d /c ver | %@QUOTE[%windir%system32find.exe] "Windows"
This fix uses the @QUOTE command to add double quotes to the file path only if needed. In a standard installation of Windows there will not be any spaces in the path to find.exe
, so now we don't need the quotes and TCC/LE won't ruin our command by combining things.
Incorrect Windows Version Information
Unfortunately for the pickier people like myself, there is an additional problem on Windows 10 with the default TCC/LE prompt. TCC/LE thinks that all Windows version strings begin with "6.3." (I believe older Windows versions used to be versioned this way), leading it to print the following initial prompt once you fix the above error:
TCC LE 14.00.9 x64 Windows 10 [Version 6.3.17763]
Copyright 2016 JP Software Inc. All Rights Reserved
Microsoft Windows [Version 10.0.17763.346]
emily@EMILY-LAPTOP C:Usersemily
$
I find this printing of two different Windows versions for the same machine to be extremely annoying, so I developed an additional fix for this bug that makes additional modifications to the cmdInit.cmd
script. That fix is to replace the fixed version of the default command with this more extensively modified command:
cls &^
echos TCC LE %_4VER%.%_BUILD% %@IF["%_X64%" == "1",x64,x86]` `&^
cmd /d /c ver | %@QUOTE[%windir%system32find.exe] "Windows"
This command erases the original incorrect prompt before replacing it with a prompt that includes the TCC/LE version information (using TCC/LE internal variables) as well as the correct windows version. Additionally, the fixed version continues to correctly print out the processor architecture (x86 or x64) and includes the same lopsided spacing as the original (there are two spaces before and after 14.00.9 x64
, but there is an additional space afterwards, leading to 2 spaces before and 3 spaces after). The fixed version with support for Windows 10 prints the following output when run (your machine's specific versions and processor arch may differ):
TCC LE 14.00.9 x64 Microsoft Windows [Version 10.0.17763.346]
emily@EMILY-LAPTOP C:Usersemily
$
Drop-in Fix
Here is a final copy/paste version of the fix with comments which you can use use as a copy/paste drop-in:
rem Simple "ver" prints empty line before Windows version
rem Use this construction to print just a version info
rem cmd /d /c ver | "%windir%system32find.exe" "Windows"
rem This is a fixed version of the original version printout for TCC/LE
rem cmd /d /c ver | %@QUOTE[%windir%system32find.exe] "Windows"
rem This is a fully fixed version which prints out the correct
rem version string for the Windows installation
cls & echos TCC LE %_4VER%.%_BUILD% %@IF["%_X64%" == "1",x64,x86]` `& cmd /d /c ver | %@QUOTE[%windir%system32find.exe] "Windows"
Remember to make a copy of cmdInit.cmd
(perhaps cmdInitTCC.cmd
), point your ConEmu tasks for TCC/LE at the edited copy of cmdInit.cmd
. If you edit cmdInit.cmd
directly, the next time you update ConEmu it will clobber your modifications (there is a warning at the top of the script). I am using this following command to start TCC/LE from ConEmu using a copy named cmdInitTCC.cmd
: %ConEmuDrive%ProgrammingLinkstcc_le-x64tcc.exe /k %ConEmuBaseDir%cmdInitTCC.cmd" -new_console:d:%USERPROFILE%
New contributor
The Unknown Command Error
That error is related to this line of the ConEmu cmdInit.cmd:
cmd /d /c ver | "%windir%system32find.exe" "Windows"
TCC/LE is mangling the command, and actually ends up executing this:
cmd /d /c ver | "%windir%system32find.exe Windows"
That modified version is an invalid command, and that is why we get an error. Fixing this is as easy as making TCC/LE aware that we don't want it to "helpfully" auto-concatenate our strings using the following replacement command:
cmd /d /c ver | %@QUOTE[%windir%system32find.exe] "Windows"
This fix uses the @QUOTE command to add double quotes to the file path only if needed. In a standard installation of Windows there will not be any spaces in the path to find.exe
, so now we don't need the quotes and TCC/LE won't ruin our command by combining things.
Incorrect Windows Version Information
Unfortunately for the pickier people like myself, there is an additional problem on Windows 10 with the default TCC/LE prompt. TCC/LE thinks that all Windows version strings begin with "6.3." (I believe older Windows versions used to be versioned this way), leading it to print the following initial prompt once you fix the above error:
TCC LE 14.00.9 x64 Windows 10 [Version 6.3.17763]
Copyright 2016 JP Software Inc. All Rights Reserved
Microsoft Windows [Version 10.0.17763.346]
emily@EMILY-LAPTOP C:Usersemily
$
I find this printing of two different Windows versions for the same machine to be extremely annoying, so I developed an additional fix for this bug that makes additional modifications to the cmdInit.cmd
script. That fix is to replace the fixed version of the default command with this more extensively modified command:
cls &^
echos TCC LE %_4VER%.%_BUILD% %@IF["%_X64%" == "1",x64,x86]` `&^
cmd /d /c ver | %@QUOTE[%windir%system32find.exe] "Windows"
This command erases the original incorrect prompt before replacing it with a prompt that includes the TCC/LE version information (using TCC/LE internal variables) as well as the correct windows version. Additionally, the fixed version continues to correctly print out the processor architecture (x86 or x64) and includes the same lopsided spacing as the original (there are two spaces before and after 14.00.9 x64
, but there is an additional space afterwards, leading to 2 spaces before and 3 spaces after). The fixed version with support for Windows 10 prints the following output when run (your machine's specific versions and processor arch may differ):
TCC LE 14.00.9 x64 Microsoft Windows [Version 10.0.17763.346]
emily@EMILY-LAPTOP C:Usersemily
$
Drop-in Fix
Here is a final copy/paste version of the fix with comments which you can use use as a copy/paste drop-in:
rem Simple "ver" prints empty line before Windows version
rem Use this construction to print just a version info
rem cmd /d /c ver | "%windir%system32find.exe" "Windows"
rem This is a fixed version of the original version printout for TCC/LE
rem cmd /d /c ver | %@QUOTE[%windir%system32find.exe] "Windows"
rem This is a fully fixed version which prints out the correct
rem version string for the Windows installation
cls & echos TCC LE %_4VER%.%_BUILD% %@IF["%_X64%" == "1",x64,x86]` `& cmd /d /c ver | %@QUOTE[%windir%system32find.exe] "Windows"
Remember to make a copy of cmdInit.cmd
(perhaps cmdInitTCC.cmd
), point your ConEmu tasks for TCC/LE at the edited copy of cmdInit.cmd
. If you edit cmdInit.cmd
directly, the next time you update ConEmu it will clobber your modifications (there is a warning at the top of the script). I am using this following command to start TCC/LE from ConEmu using a copy named cmdInitTCC.cmd
: %ConEmuDrive%ProgrammingLinkstcc_le-x64tcc.exe /k %ConEmuBaseDir%cmdInitTCC.cmd" -new_console:d:%USERPROFILE%
New contributor
edited 4 hours ago
New contributor
answered 4 hours ago
Emily MabreyEmily Mabrey
1264
1264
New contributor
New contributor
add a comment |
add a comment |
Emily Mabrey is a new contributor. Be nice, and check out our Code of Conduct.
Emily Mabrey is a new contributor. Be nice, and check out our Code of Conduct.
Emily Mabrey is a new contributor. Be nice, and check out our Code of Conduct.
Emily Mabrey is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1413230%2fhow-to-fix-the-unknown-command-error-caused-by-starting-cmdinit-cmd-using-tcc-le%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown