Bug: Some internal commands return a dialog box

English support forum

Moderators: Hacker, petermad, Stefan2, white

foxidrive
Junior Member
Junior Member
Posts: 90
Joined: 2004-02-28, 11:50 UTC

Bug: Some internal commands return a dialog box

Post by *foxidrive »

These internal cmd.exe commands return a "file not found" dialog box - I would prefer to have them executed, even if the last six don't actually perform a useful purpose in doing so.

call
echo
set
if
for
assoc
ftype
erase
chdir
mkdir

rem
shift
goto
prompt
setlocal
endlocal
Last edited by foxidrive on 2004-02-29, 08:09 UTC, edited 1 time in total.
User avatar
norfie
Power Member
Power Member
Posts: 1194
Joined: 2003-02-18, 14:18 UTC

Post by *norfie »

Last edited by norfie on 2004-09-11, 07:30 UTC, edited 1 time in total.
foxidrive
Junior Member
Junior Member
Posts: 90
Joined: 2004-02-28, 11:50 UTC

Post by *foxidrive »

Where's the logic?

I don't have to type

cmd /cregedit
or
cmd /cdebug


so why do I need to type

cmd /cfor ...
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

regedit and debug are executables being located through path variable. The others need the interpreter to be loaded first.

As long as TC uses antique noclose.pif there is no chance for an intelligent TC behaviour "guessing" what interpreter a command might be contained in...

Icfu
User avatar
norfie
Power Member
Power Member
Posts: 1194
Joined: 2003-02-18, 14:18 UTC

Post by *norfie »

Last edited by norfie on 2004-09-11, 07:30 UTC, edited 1 time in total.
foxidrive
Junior Member
Junior Member
Posts: 90
Joined: 2004-02-28, 11:50 UTC

Post by *foxidrive »

TC runs DIR from the prompt, which is an internal command of cmd.exe, so the path argument doesn't wash.

The current behaviour of TC WRT internal commands is not consistant. I'm simply trying to improve the command line behaviour of TC.

You guys ever see the Monty Python Argument sketch?
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

Important interpreter commands are hardcoded with "%comspec% command", the rest doesn't work.

I like your proposal and wished it would be supported by ghisler but because I read it already a dozen times (don't presume that you are the first one mentioning it...) I doubt that something will change, we'll have to wait and see.

Do you know any other app still creating pifs in windows dir for compatibility means? Well, I don't... ;)

Icfu
foxidrive
Junior Member
Junior Member
Posts: 90
Joined: 2004-02-28, 11:50 UTC

Post by *foxidrive »

Thanks for your reply. As others have suggested it then we can only wait until C.Ghisler has the time and inclination to implement it.
User avatar
norfie
Power Member
Power Member
Posts: 1194
Joined: 2003-02-18, 14:18 UTC

Post by *norfie »

Last edited by norfie on 2004-09-11, 07:30 UTC, edited 1 time in total.
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

copy, too, some more probably... No time to check, I use cmd /k anyway. ;)
I'm afraid it will be implemented never because there no clean way finding out all internal command of any command interpreter.
No need to find out, it would be enough if TC would just start %comspec% when it doesn't know a command or doesn't find the executable.

Or one could make a nice checkbox besides command line called "insert cmd /k before execution".
Somewhat like that...

Icfu
User avatar
norfie
Power Member
Power Member
Posts: 1194
Joined: 2003-02-18, 14:18 UTC

Post by *norfie »

Last edited by norfie on 2004-09-11, 07:29 UTC, edited 1 time in total.
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

'm afraid it's not so simple. If TCmd would do so http://... or ftp://... wouldn't work.
TC checks not only executables and internals command but also registry keys!

http:// and ftp:// are protocols and therefore lead to the execution of the corresponding HKEY_CLASSES_ROOT\HTTP\shell\open\command resp. HKEY_CLASSES_ROOT\FTP\shell\open\command

I suggest you use diskmon and regmon from sysinternals.com to investigate how TC is working, no need to think too complicated.

Icfu
IGL
Member
Member
Posts: 179
Joined: 2004-02-26, 10:47 UTC
Location: Poland

TC supports important commands,if more needed use .BAT files

Post by *IGL »

TC does supports important useful commands in command line,

What for do you need CALL if you do not run it in a .BAT file???
I see no reason to do that, unless you try to run *.BAT files line by line in TC command line (but that does not make sens too). .

But if someone really needs something like that there's a way:
Just create .BAT file and execute the Batch file.
For example - you want to have echo command.
You type "echo Some text" and want to have it displayed on DOS screen.
You need to go to the directory which is in search path (eg C:\Bat - add it to PATH environment variable and put all *.BAT files to execute, OR you can use C:\Windows - but I do not recommend that)
Now create in that dir file echo.bat and in it's content create one line:
echo %1 %2 %3 %4 %5 %6 %7 %8 %9

additionally you can add command PAUSE at the end.

Now whenever you type echo xxxxx it will display that text and will not provide error.
Exception - is supports up to 9 parameters (could be somehow fixed with Shift command).
Exception2 - if you type ECHO. you will receive error - I see no workaroud for that (except pressing Shift+Enter to execute command).

I hope that using these BAT files will help. Eventually use Shift+Enter.

Personally I am against modifying TC to support this (unless you have better arguments :) )
Last edited by IGL on 2004-03-01, 09:58 UTC, edited 1 time in total.
:-)
User avatar
Hacker
Moderator
Moderator
Posts: 13142
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Exception - is supports up to 9 parameters (could be somehow fixed with Shift command).
%* AFAIK.

HTH
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
IGL
Member
Member
Posts: 179
Joined: 2004-02-26, 10:47 UTC
Location: Poland

Post by *IGL »

Indeed, instead of: echo %1 %2 %3 %4 %5 %6 %7 %8 %9
it is better to use: echo %*
(But better check if your Windows supports it, type:
echo 1 2 3 4 5 6 7 8 9 10 abc
and see if 10 and abc are also displayed.)

2Hacker - THX, What windows versions support %* - I think it could not be used under DOS, but it works with Win XP, how about NT/2000 and Win 95/98?
:-)
Post Reply