Declined Add option to use SFN for ComSpec variable

Jun 2, 2008
38
0
Denmark
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).
 
May 20, 2008
3,515
4
Elkridge, MD, USA
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
 
Jun 2, 2008
38
0
Denmark
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.
 
May 20, 2008
3,515
4
Elkridge, MD, USA
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
 
Jun 2, 2008
38
0
Denmark
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
Thread starter Title Forum Replies Date
R Option to add tcc to Bash profile Suggestions 1
D Done Suggestion: Add VIEW option to open in same position as current window Suggestions 0
D Done BDEBUGGER: add cmdline option to set a breakpoint at a given line Suggestions 0
R Declined Install option: Add File Explorer Run As Adminstrator option Suggestions 14
Charles Dye Done @SNAPSHOT: Add option to capture the entire virtual screen Suggestions 0
rps Declined ECHO -- Add spacing option Suggestions 2
D Done Add VIEW option to open in same position as current window Suggestions 0
rconn Add option to run programs Elevated from toolbar buttons Suggestions 0
G Declined Add option to turn on file name case sensitivity Suggestions 6
S Declined Add /W(ipe) option to several commands Suggestions 17
W Done Add an option to control command line parsing Suggestions 7
Joe Caverly Done Add ability to DEL Stream from SYMLINK Suggestions 2
Joe Caverly Add VHD to @drivetype Suggestions 1
R Add Custom Message to commands Suggestions 2
mfarah Declined Implement an "Add TCC to the task bar" in the TCMD installer. Suggestions 2
C Declined Add switch to MOVE to not make empty destination folders. (COPY's /F) Suggestions 4
M Add "ReleaseID" (aka version or build) to ver output Suggestions 2
R Declined In setup, add back/refresh buttons. Suggestions 1
D Done TCEdit and BDEBUGGER: add cmdline switch to jump to given line Suggestions 2
R Done Add "Evaluate Expression" to Right-Click Context Menu in Batch Debugger Suggestions 3
S Add support for Git auto-completion Suggestions 0
R Declined wish-list: add a command to copy a file to clipboard. Suggestions 17
Dmitry L. Kobyakov Done Add the possibility to comment the ENDIFF Suggestions 11
Charles Dye Declined Windows functions and command: Add syntax to specify HWND directly Suggestions 0
R Done Add Libraries and Multi-line In-Memory functions to Features List on Website Suggestions 1
R Done Add to Pause Help text re indenting the prompt Suggestions 0
C Done Add ability for inline image files for sendmail or similar Suggestions 2
WinLanEm Add commands and functions Suggestions 11
rps Declined Add auto-load directives to tcmd.ini Suggestions 3
fromano Declined Add library functions to shralias saving feature Suggestions 12
Joe Caverly Add a "Snippet" Menu to CMDebug and TCC Debugger Suggestions 0
D Done Add the ability to control syntax coloring via an environment variable or some other way Suggestions 3
Joe Caverly Add example .BTM code to TCC Debugger and CMDebug Suggestions 1
Alpengreis Done Add "Slow copy" (/WAIT) parameter to SYNC command Suggestions 1
Charles Dye Done MOUNTISO: Add support for VHD / VHDX files Suggestions 5
A Declined Take Command/Debugger as a Visual Studio 2017 add-in/extension Suggestions 4
rps Declined Add optional parameters to @search Suggestions 4
rps Done Add PDIR switches Suggestions 1
vefatica Done Add log2 to @EVAL Suggestions 3
rps Done Add exclusion ranges to @files Suggestions 0
R Done Add a .btm LIBRARY system Suggestions 12
N Done Add display options to new HASH function Suggestions 1
rconn Add a parameter to dir command to handle zip files as folders Suggestions 1
rconn add support for batch file projects Suggestions 0
rconn Add support for backpipes Suggestions 0
rconn In the Help tab let the user add links either to files or web pages, with an icon & label. Suggestions 0
W Done Add colorize to tree command? Suggestions 0
Phileosophos Done Please add options for scrollback buffer searching Suggestions 24
nickles Done Add a "Mark all threads read" button Suggestions 3
B Done Add New INI Directive To Specify WIPE Default Pass Count Suggestions 0

Similar threads