[Feature Suggestion] TC Command Line Improvements
Moderators: Hacker, petermad, Stefan2, white
[Feature Suggestion] TC Command Line Improvements
I suggest the following new options for the TC Command Line in [Configuration] of wincmd.ini:
[face=courier]CmdPrefixEnter
CmdPrefixShiftEnter[/face]
CmdPrefixEnter could be used to specify the command shell (including zero or more of its switches) that will be invoked by TC to execute external commands when the TC command line is not empty and the user presses the Enter or Return key. (TC-internal commands are cd, md, rd and perhaps a few more.)
CmdPrefixShiftEnter would have the same meaning except that it will be used only when the user presses Shift+Enter or Shift+Return.
I think the settings for the current behavior would be:
[face=courier]CmdPrefixEnter=command.com
CmdPrefixShiftEnter=command.com /c[/face]
The current behavior with Shift+Enter has the following drawbacks (at least on Windows 2000):
1. You cannot call .exe files with an explicit directory specification.
(It works only if the .exe file is specified without its directory and the directory specification is in %PATH%).
2. You cannot call .bat or .cmd files (with or without explicit directory specification).
3. command.com is a 16-bit program and runs within ntvdm.exe (NT virtual DOS machine).
My preferred settings would be:
[face=courier]CmdPrefixEnter=%ComSpec%
CmdPrefixShiftEnter=%ComSpec% /k[/face]
%ComSpec% is a Windows-defined environment variable. On Windows 2000 its value is something like
[face=courier]>set comspec
ComSpec=D:\WINNT\system32\cmd.exe[/face]
BTW: Currently the cm_ExecuteDOS command also calls %ComSpec%.
[face=courier]CmdPrefixEnter
CmdPrefixShiftEnter[/face]
CmdPrefixEnter could be used to specify the command shell (including zero or more of its switches) that will be invoked by TC to execute external commands when the TC command line is not empty and the user presses the Enter or Return key. (TC-internal commands are cd, md, rd and perhaps a few more.)
CmdPrefixShiftEnter would have the same meaning except that it will be used only when the user presses Shift+Enter or Shift+Return.
I think the settings for the current behavior would be:
[face=courier]CmdPrefixEnter=command.com
CmdPrefixShiftEnter=command.com /c[/face]
The current behavior with Shift+Enter has the following drawbacks (at least on Windows 2000):
1. You cannot call .exe files with an explicit directory specification.
(It works only if the .exe file is specified without its directory and the directory specification is in %PATH%).
2. You cannot call .bat or .cmd files (with or without explicit directory specification).
3. command.com is a 16-bit program and runs within ntvdm.exe (NT virtual DOS machine).
My preferred settings would be:
[face=courier]CmdPrefixEnter=%ComSpec%
CmdPrefixShiftEnter=%ComSpec% /k[/face]
%ComSpec% is a Windows-defined environment variable. On Windows 2000 its value is something like
[face=courier]>set comspec
ComSpec=D:\WINNT\system32\cmd.exe[/face]
BTW: Currently the cm_ExecuteDOS command also calls %ComSpec%.
Last edited by jb on 2003-02-18, 16:22 UTC, edited 1 time in total.
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Currently ENTER uses %comspec%, while Shift+Enter uses noclose.pif. You can change noclose.pif with Alt+Enter.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
IMHO, installation procedure should copy one of two noclose.pif depending on OS, pointing either to command.com or to cmd.exe, because not all people understand what's this and why it should be changed and how.ghisler(Author) wrote:Currently ENTER uses %comspec%, while Shift+Enter uses noclose.pif. You can change noclose.pif with Alt+Enter.
Last edited by Valentino on 2003-02-23, 10:02 UTC, edited 1 time in total.
[face=courier]On 22-02-2003 20:29:30 +0000 Valentino wrote:
V> IMHO, installation procedure should copy on of
V> two noclose.pif depending on OS, pointing either
V> to command.com or to cmd.exe
Correct me if I wrong, but NT starts ntvdm.exe for any application ran via PIF regardless on command interpreter you set there. I think it's a good idea to implement user defined prefix command instead of PIF as jb suggested.[/face]
V> IMHO, installation procedure should copy on of
V> two noclose.pif depending on OS, pointing either
V> to command.com or to cmd.exe
Correct me if I wrong, but NT starts ntvdm.exe for any application ran via PIF regardless on command interpreter you set there. I think it's a good idea to implement user defined prefix command instead of PIF as jb suggested.[/face]
[face=courier]The Protoss do NOT run from their enemies.
It is here, that we shall make our stand.[/face]
It is here, that we shall make our stand.[/face]
No, it is not the same thing. COMMAND.COM is a 16-bit program and therefore NT calls ntvdm.exe first. CMD.EXE is a 32-bit program and will be started directly (as it already happens when you use cm_ExecuteDOS).Valentino wrote:Won't ntvdm.exe be called if prefix will contain cmd.exe (or command.com)? Seems the same...