Welcome!

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

SignUp Now!

How to set comspec to point to cmd.exe?

May
318
6
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
 
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.
 
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
 
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
 
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
 
Back
Top
[FOX] Ultimate Translator
Translate