How to set comspec to point to cmd.exe?

May 20, 2009
293
5
57
ITALY
On my laptop, I have TakeCommand 14.02.39 and Windows 2003.
I have made so many tests with my system that now it is a mess.
I run cmd.exe, from start->run, or from start->programs->accessories->command prompt, or from a desktop icon.
Now, I type set.
I see that comspec points to TakeCommand: "F:\Program Files\JPSoft\TakeCommand\14\TCC.EXE".
If I check the system in control panel, in environment variables I see that comspec points to the correct "%SystemRoot%\system32\cmd.exe".
I would like to know if and how it is possible to change comspec so that another program see cmd.exe, of course I agree that inside TakeCommand it sees itself.

Thank You very much and regards

Rodolfo Giovanninetti
 
May 20, 2008
473
2
The TCC defaults comspec, but you can set it like any other environment variable. I do it after a setlocal in a batch file so it doesn't stay that way and I don't have to manually set it back. I often do this comspec change just before calling a Visual Studio build process that needs to invoke cmd internally.
 
May 20, 2009
293
5
57
ITALY
The TCC defaults comspec, but you can set it like any other environment variable.
Thank You for the help, but what I mean is that I run a program that should not even be aware of TakeCommand, and instead it finds the comspec variable set to point to TakeCommand. So, I would like to know where set setup of TakeCommand has put its path and how I can revert it back to cmd. When I run TakeCommand, I understand that it sets comspec to point to itself, so if I run another program from inside TakeCommand, it is normal that the other program finds the comspec modified. But if I run a program from the desktop, I would like to have standard environment.

Thank You and regards

Rodolfo Giovanninetti
 
May 20, 2009
293
5
57
ITALY
Take Command does not change the default comspec. TCC does change it for itself (and child processes).

The system comspec is set in the control panel / system.
Yes, and in my control panel system the environment variable is "%SystemRoot%\system32\cmd.exe".
The issue is that I run cmd.exe or even powershell NOT from inside TCC, but directly.
I look for the environment variable comspec, and it points to tcc.
So, apart from removing TakeCommand and reinstalling it, do You know how I can check/fix this issue?

Thank You very much again and regards

Rodolfo Giovanninetti
 
May 20, 2009
293
5
57
ITALY
Yes, and in my control panel system the environment variable is "%SystemRoot%\system32\cmd.exe".
I do not know what had happened, but I fixed it.
In control panel/system I chose to edit that environment variable.
I remove the last "e".
Than I edited it again and I added the "e".
And now if I run cmd or powershell the comspec variable is ok.
So, somehow it was showing me a value and instead it used another one, and my fake editing forced the correct value.

Regards

Rodolfo Giovanninetti
 
Similar threads
Thread starter Title Forum Replies Date
V Set path permanently from within TCC? Support 3
S Debugger keeps breaking with no break point set. Support 1
Joe Caverly Set a batch variable (%1 - %n) when TCC is executing a batch file Support 5
R How to? Set default application in a special folder Support 4
A How to? Set up SMTP password in TCC-RT Support 1
vefatica WAD More SET /A woes Support 4
vefatica SET /A and multidimensional array. Support 1
M How to set Path variable for non-executable file extensions in 4DOS Support 8
D Need to set Take Command font size when switching to high DPI display Support 0
P "Set" command behavior - a bug? Support 3
M How to? Set the ribbon titles to mixed case Support 1
X How to set %_INIREAD result to variable Support 5
M WAD Set statements in () causes problems Support 8
M How to? How to set a default TITLE for newly opened tab? Support 2
M Fixed Set "VAR=VAL" format causes problems Support 12
vefatica SET /A var=expression=digits Support 3
cxxl Set encoding for batch file Support 4
B TCC 21.01.50 Problem with ALIAS /r and SET /r Support 2
vefatica SET /A var\=...? Support 10
dcantor Documentation SET /T: missing from heading Support 0
fpefpe Documentation Set /v Support 4
vefatica What's SET /Z? Support 1
R Fixed set /r has stopped working in build 35 Support 4
BeechComer Debugger: how to set %1 variable? Support 3
fpefpe How to? Global variable set /v Support 4
fpefpe Documentation Can the title line of tcmd be set? Support 4
J How to set working directory Support 10
Jay Sage Failure of ACTIVATE to Set a Window Position Support 3
rps Fixed Win "set /p" not working in V17 build 53 Support 3
vefatica SET /A "var%=N", TCC vs. CMD Support 0
J Set environment variable from stdout of command Support 3
B How to? Pre-set _tcfolder on startup when Folders is set Auto-Hide Support 6
Dan Glynhampton Fixed @version "force" flag not working, and unable to set separator Support 3
R WAD /= size ranges not set correctly Support 5
S How to? Set the timestamp of ZIP command built archive to match latest member Support 8
Mordachai Help! How to set parameters for script I'm debugging?! Support 6
Roedy SET= Support 2
A How to? Set up a log file for all command output Support 3
M Fixed character set in dir/copy Support 3
Phileosophos Fixed TakeCommand exits upon "set [" command Support 14
S WAD SET problem - array element initialization Support 11
C Wildcard expansion in FOR set Support 27
vefatica SET question Support 16
T Set 1% then Echo 1% Support 9
S SET /A question; HELP nits Support 8
noahcoad copy /w to FTP does not set time stamp Support 1
M A request for a new feature for the "set" command... Support 5
cgunhouse Accessing variables set using SET /U or SET /S Support 3
D Force For to treat set of values as text, not files Support 3
vefatica Regular expressions in FOR's set? Support 10

Similar threads