Welcome!

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

SignUp Now!

Declined Add option to use SFN for ComSpec variable

Jun
40
0
I have TCMD/TCC installed in "C:\Program Files\JPSoft\TCMD9" and so TCC sets the ComSpec variable accordingly:
set comspec
C:\ProgramFiles\JPSoft\TCMD9\tcc.exe
This confuses programs that expect ComSpec to be without spaces as it is when CMD is running:
set comspec
ComSpec=C:\WINDOWS\system32\cmd.exe
I propose an option for TCC where you can tell it to set the ComSpec variable using the short file name (SFN).
 
ebbe wrote:
| I have TCMD/TCC installed in "C:\Program Files\JPSoft\TCMD9" and so
| TCC sets the ComSpec variable accordingly:set comspec
| C:\ProgramFiles\JPSoft\TCMD9\tcc.exe
|
| This confuses programs that expect ComSpec to be without spaces as it
| is when CMD is running:set comspec ComSpec=C:\WINDOWS\system32\cmd.exe
|
| I propose an option for TCC where you can tell it to set the ComSpec
| variable using the short file name (SFN).

You can do it yourself in your TCSTART.BTM:

set comspec=%@sfn[%comspec]

Better yet, do what many others do: make your computer your Personal
Computer (and not Bill's playground), ignore Microsoft's rules for default
installation directory, and install JPsoft (and other) products using
pathnamess without special characters, e.g., C:\JPsoft\TCMD9. If you do this
when installing the product, all Windows (registry) references will be to
the simple path.

Another alternative: create a soft link C:\Programs to "C:\Program Files".
In WinXP this would have to be a "junction", but in Vista it could be a hard
link. This effectively creates your own, private SFN for "C:\Program Files".

Lastly, the method which may be the simplest, but possibly not very pleasing
one: start TCC using its SFN! Do this by modifying the desktop shortcuts,
etc.
--
HTH, Steve
 
You can do it yourself in your TCSTART.BTM:

set comspec=%@sfn[%comspec]
Yes, and that's the one I'll use since I can implement it without (too much) fuss.

ignore Microsoft's rules for default
installation directory, and install JPsoft (and other) products using
pathnamess without special characters, e.g., C:\JPsoft\TCMD9.
I'll keep this one in mind when I have to install TCMD on a new PC.

Another alternative: create a soft link C:\Programs to "C:\Program Files".
In WinXP this would have to be a "junction", but in Vista it could be a hard
link. This effectively creates your own, private SFN for "C:\Program Files".
Interesting idea - but I think I'll go with the simple method (above).

Lastly, the method which may be the simplest, but possibly not very pleasing
one: start TCC using its SFN! Do this by modifying the desktop shortcuts,
etc.
This one probably works if you start TCC directly. It does not work when starting TCC through Take Command - as I do.
 
Try it with quotes "drive:\path\comspec"
This works only in the cases where I have access to the source code (and permission to change it) for the program that uses the Comspec variable. Unfortunately, this is far from always the case.
 
ebbe wrote:
| ---Quote (Originally by Steve Fábián)---
| Lastly, the method which may be the simplest, but possibly not very
| pleasing
| one: start TCC using its SFN! Do this by modifying the desktop
| shortcuts,
| etc.
| ---End Quote---
| This one probably works if you start TCC directly. It does not work
| when starting TCC through Take Command - as I do.

Start TCMD using its SFN path, and I suspect TCC will use it, too! If you
use the [TABn] section in TCMD's .INI file to automatically start TCC, you
can again use the SFN for TCC.EXE.
--
Steve
 
Steve FXbiXn wrote:


> Start TCMD using its SFN path, and I suspect TCC will use it, too! If
> you use the [TABn] section in TCMD's .INI file to automatically start
> TCC, you can again use the SFN for TCC.EXE.

We just had a thread which showed that TCC returnes "wrong" values when
started with a SFN path.

Mit freundlichem Gruß,

Klaus Meinhard
 
Start TCMD using its SFN path, and I suspect TCC will use it, too!
That was the first thing I tried. Unfortunately, your suspicion is wrong :)

If you use the [TABn] section in TCMD's .INI file to automatically start TCC, you can again use the SFN for TCC.EXE.
Actually, i the Tab-tab in TCMD options, you can set the Comspec variable. However, setting the Comspec to the equivalent SFN has a slight sideeffect, namely that when you have your path displayed in the prompt, that path is now shown as a SFN.

So I ended up biting the bullet and re-installed TCMD in c:\TCMD9. This should also take care of the problem that Klaus mentions.

Thanks to all who helped out here ;)
 
| ---Quote (Originally by Rex Clark)---
| Try it with quotes "drive:\path\comspec"
| ---End Quote---

This works only in the cases where I have access to the source code (and
permission to change it) for the program that uses the Comspec variable.
Unfortunately, this is far from always the case.

Sorry i wasn't very clear
manual entry..
set comspec="c:\long ass windoz\path name\to\simply the best shell
ever\4nt.exe"
what ever your prefered jpsoft shell is

or do as others do ignore default install folder
 

Similar threads

Back
Top