ntcmdprompt usage question

N

ned

let me illustrate the issue ...

open an xp cmd prompt
type "c:" then "cd\program files"
the prompt is "c:\program files>"
now type "debug" followed by "q" to quit
the prompt is now "c:\progra~1" because command.com ran

i un-rem-ed ntcmdprompt in c:\windows\system32\config.nt
i thought it was supposed to force xp to use cmd.exe instead of
command.com
yet the above symptoms, ie, 8.3 directory names, persists

my goal is to be able to run batch files from the console with
imbedded long file names.

thanks in advance.
 
W

Wesley Vogel

What is debug ?? A folder? A COM file, .EXE file, .BAT file, .CMD file,
..VBS file, .VBE file, .JS file, .JSE file, .WSF file, .WSH file or what??

And why does whatever debug is cause command.com to run? Is debug 16-bit?
i un-rem-ed ntcmdprompt in c:\windows\system32\config.nt
i thought it was supposed to force xp to use cmd.exe instead of
command.com

REM it out again. REM NTCMDPROMPT

Config.nt and autoexec.nt only affect command.com which is 16-bit. The 16
Bit MS-DOS Subsystem uses command.com. Config.nt or autoexec.nt have no
affect on cmd.exe, the Windows Command Processor which is 32-bit.
my goal is to be able to run batch files from the console with
imbedded long file names.

Cmd.exe handles long file names. Is debug a .bat file with old commands?

From config.nt...
REM When you return to the command prompt from a TSR or while running an
REM MS-DOS-based application, Windows runs COMMAND.COM. This allows the
REM TSR to remain active. To run CMD.EXE, the Windows command prompt,
REM rather than COMMAND.COM, add the command ntcmdprompt to CONFIG.NT or
REM other startup file.

<quote>
Ntcmdprompt
Runs the command interpreter Cmd.exe, rather than Command.com, after running
a TSR or after starting the command prompt from within an MS-DOS
application.

Remarks
When Command.com is running, some features of Cmd.exe, such as the doskey
display of command history, are not available. If you would prefer to run
the Cmd.exe command interpreter after you have started a TSR or started the
command prompt from within an application based on MS-DOS, you can use the
ntcmdprompt command. However, keep in mind that the TSR may not be available
for use when you are running Cmd.exe. You can include the ntcmdprompt
command in your Config.nt file or the equivalent custom startup file in an
application's program information file (PIF).
Examples
To include ntcmdprompt in your Config.nt file, or the configuration startup
file specified in the PIF, type:

ntcmdprompt
<quote>

Paste the following line into Start | Run and click OK...

hh ntcmds.chm::/ntcmdprompt.htm

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
N

ned

What is debug ?? A folder? A COM file, .EXE file, .BAT file, .CMD file,
.VBS file, .VBE file, .JS file, .JSE file, .WSF file, .WSH file or what??

And why does whatever debug is cause command.com to run? Is debug 16-bit?


REM it out again. REM NTCMDPROMPT

Config.nt and autoexec.nt only affect command.com which is 16-bit. The 16
Bit MS-DOS Subsystem uses command.com. Config.nt or autoexec.nt have no
affect on cmd.exe, the Windows Command Processor which is 32-bit.


Cmd.exe handles long file names. Is debug a .bat file with old commands?

From config.nt...
REM When you return to the command prompt from a TSR or while running an
REM MS-DOS-based application, Windows runs COMMAND.COM. This allows the
REM TSR to remain active. To run CMD.EXE, the Windows command prompt,
REM rather than COMMAND.COM, add the command ntcmdprompt to CONFIG.NT or
REM other startup file.

<quote>
Ntcmdprompt
Runs the command interpreter Cmd.exe, rather than Command.com, after running
a TSR or after starting the command prompt from within an MS-DOS
application.

Remarks
When Command.com is running, some features of Cmd.exe, such as the doskey
display of command history, are not available. If you would prefer to run
the Cmd.exe command interpreter after you have started a TSR or started the
command prompt from within an application based on MS-DOS, you can use the
ntcmdprompt command. However, keep in mind that the TSR may not be available
for use when you are running Cmd.exe. You can include the ntcmdprompt
command in your Config.nt file or the equivalent custom startup file in an
application's program information file (PIF).
Examples
To include ntcmdprompt in your Config.nt file, or the configuration startup
file specified in the PIF, type:

ntcmdprompt
<quote>

Paste the following line into Start | Run and click OK...

hh ntcmds.chm::/ntcmdprompt.htm

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In

let me begin again. i'm in the windows xp console, ie, cmd.exe. i run
a 32 bit program from the command line. when it returns, command.com
seems to be running instead of cmd.exe -- long path names are being
reported as 8.3 short names. i am looking for a way to prevent
command.com from running. the docs in config.nt seem to indicate that
ntcmdprompt would do that, but it does nothing as far as i can
determine.
 
P

Paul

let me begin again. i'm in the windows xp console, ie, cmd.exe. i run
a 32 bit program from the command line. when it returns, command.com
seems to be running instead of cmd.exe -- long path names are being
reported as 8.3 short names. i am looking for a way to prevent
command.com from running. the docs in config.nt seem to indicate that
ntcmdprompt would do that, but it does nothing as far as i can
determine.- Hide quoted text -

- Show quoted text -

"debug" is a legacy 16-bit program. So actually ntvdm.exe will be run
to simulate a 16bit environment. "command.exe" is also a 16bit
program. That's the reason why you got 8.3 short names.
 
W

Wesley Vogel

"debug" is a legacy 16-bit program. So actually ntvdm.exe will be run
to simulate a 16bit environment.

Yep.

Debug
Starts Debug.exe, a program you can use to test and debug MS-DOS executable
files.
Windows XP does not use this command. It is accepted only for compatibility
with MS-DOS files.
Debug is a MS-DOS subsystem command that runs under WOW/NTVDM.
hh ntcmds.chm::/debug.htm

C:\WINDOWS\system32\debug.exe is a 16-bit application. See debug.exe
Properties. A 16-bit program does not have a Version tab in this dialog
box.
"command.exe" is also a 16bit
program. That's the reason why you got 8.3 short names.

Nope.

"command.exe" is not correct, it is command.com. Command.exe is created by
a trojan. Cmd.com is also created by a trojan.

But since command.com runs, that is why the short names. Command.com will
not handle long names. Debug probably does not handle long names either.

cmd.exe is the Windows Command Processor which is 32-bit and command.com is
NT's version of the MS-DOS command prompt and is a 16-bit DOS application
that runs under ntvdm.exe.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
N

ned

Yep.

Debug
Starts Debug.exe, a program you can use to test and debug MS-DOS executable
files.
Windows XP does not use this command. It is accepted only for compatibility
with MS-DOS files.
Debug is a MS-DOS subsystem command that runs under WOW/NTVDM.
hh ntcmds.chm::/debug.htm

C:\WINDOWS\system32\debug.exe is a 16-bit application. See debug.exe
Properties. A 16-bit program does not have a Version tab in this dialog
box.


Nope.

"command.exe" is not correct, it is command.com. Command.exe is created by
a trojan. Cmd.com is also created by a trojan.

But since command.com runs, that is why the short names. Command.com will
not handle long names. Debug probably does not handle long names either.

cmd.exe is the Windows Command Processor which is 32-bit and command.com is
NT's version of the MS-DOS command prompt and is a 16-bit DOS application
that runs under ntvdm.exe.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In

the reason i was using debug was that i knew it was a 16 bit program
that would invoke command.com and illustrate the problem, which is ...

why do i see 8.3 dir names after debug exits? i tought ntcmdprompt was
supposed to force cmd.exe to get control back, which i would think
would give a long file name prompt.
 
W

Wesley Vogel

BTW, any command typed into command.com is executed by cmd.exe.
why do i see 8.3 dir names after debug exits? i tought ntcmdprompt was
supposed to force cmd.exe to get control back, which i would think
would give a long file name prompt.

ntcmdprompt has nothing to do with it.

CD to any folder using long names and cmd.exe will go back to displaying
long names.

From your original post...
open an xp cmd prompt
type "c:" then "cd\program files"
the prompt is "c:\program files>"
now type "debug" followed by "q" to quit
the prompt is now "c:\progra~1" because command.com ran

OK, I pretty much did that.

Example below copied from cmd.exe, note that my cmd.exe starts at the C:\>
prompt.

-----------------
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\>cd program files

C:\Program Files>debug
-q

C:\PROGRA~1>cd C:\Documents and Settings\Wesley P. Vogel\Desktop

C:\Documents and Settings\Wesley P. Vogel\Desktop>
-----------------

If command.com were still in the picture, cd C:\Documents and
Settings\Wesley P. Vogel\Desktop would bring up the Too many parameters
error.

Example below copied from command.com, note that my command.com also starts
at the C:\> prompt.

-----------------
Microsoft(R) Windows DOS
(C)Copyright Microsoft Corp 1990-2001.

C:\>cd C:\Documents and Settings\Wesley P. Vogel\Desktop
Too many parameters - and

C:\>
-----------------

CD to any folder and it will go back to long names. Cmd.exe can handle long
or short names.

Another example copied from cmd.exe.

----------------
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\>
C:\>
C:\>cd C:\DOCUME~1\WESLEY~1.VOG\STARTM~1

C:\DOCUME~1\WESLEY~1.VOG\STARTM~1>
C:\DOCUME~1\WESLEY~1.VOG\STARTM~1>
C:\DOCUME~1\WESLEY~1.VOG\STARTM~1>cd C:\Documents and Settings\Wesley P.
Vogel\M
y Documents\UTILITIES

C:\Documents and Settings\Wesley P. Vogel\My Documents\UTILITIES>
C:\Documents and Settings\Wesley P. Vogel\My Documents\UTILITIES>
C:\Documents and Settings\Wesley P. Vogel\My Documents\UTILITIES>cd
C:\DOCUME~1\
WESLEY~1.VOG\MYDOCU~1

C:\DOCUME~1\WESLEY~1.VOG\MYDOCU~1>
C:\DOCUME~1\WESLEY~1.VOG\MYDOCU~1>
C:\DOCUME~1\WESLEY~1.VOG\MYDOCU~1>cd C:\Documents and Settings\Wesley P.
Vogel\M
y Documents

C:\Documents and Settings\Wesley P. Vogel\My Documents>
C:\Documents and Settings\Wesley P. Vogel\My Documents>
C:\Documents and Settings\Wesley P. Vogel\My Documents>cd
C:\DOCUME~1\WESLEY~1.V
OG\FAVORI~1

C:\DOCUME~1\WESLEY~1.VOG\FAVORI~1>
C:\DOCUME~1\WESLEY~1.VOG\FAVORI~1>
C:\DOCUME~1\WESLEY~1.VOG\FAVORI~1>cd C:\Documents and Settings\Wesley P.
Vogel\D
esktop\Maltese Falcon

C:\Documents and Settings\Wesley P. Vogel\Desktop\Maltese Falcon>
C:\Documents and Settings\Wesley P. Vogel\Desktop\Maltese Falcon>
C:\Documents and Settings\Wesley P. Vogel\Desktop\Maltese Falcon>cd
%userprofile
%\Desktop

C:\Documents and Settings\Wesley P. Vogel\Desktop>
C:\Documents and Settings\Wesley P. Vogel\Desktop>
C:\Documents and Settings\Wesley P. Vogel\Desktop>
C:\Documents and Settings\Wesley P. Vogel\Desktop>cd
C:\DOCUME~1\WESLEY~1.VOG\LO
CALS~1

C:\DOCUME~1\WESLEY~1.VOG\LOCALS~1>
C:\DOCUME~1\WESLEY~1.VOG\LOCALS~1>
C:\DOCUME~1\WESLEY~1.VOG\LOCALS~1>cd %userprofile%

C:\Documents and Settings\Wesley P. Vogel>
C:\Documents and Settings\Wesley P. Vogel>
C:\Documents and Settings\Wesley P. Vogel>
----------------

I think that you are worring about nothing. ;-) Cmd.exe will display in
long or short names, whatever has been typed in.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top