VOGONS


Command line interpreter

Topic actions

First post, by dnewhous

User metadata
Rank Member
Rank
Member

What is the mechanism called when you use command.com and Windows switches to cmd.exe in the background on you automatically? I think it is adequate to say cmd.exe is invoked in the background.

Daniel L Newhouse

Reply 1 of 10, by Jorpho

User metadata
Rank l33t++
Rank
l33t++

Which version of Windows are you referring to? Windows 7 doesn't even recognize "command". Do you mean Windows XP? Are we supposed to guess? Do you put a moment's thought into any of the questions you ask here? Did you try Googling?

https://flylib.com/books/en/2.194.1.92/1/
https://www.computerhope.com/issues/ch000395.htm

Reply 2 of 10, by dnewhous

User metadata
Rank Member
Rank
Member

Windows xp or Windows 7 or even Windows 2000. If you type a command like "ipconfig" in command.com the title bar will change to "cmd.exe". Command.com is also labeled "MS-DOS."

Daniel L Newhouse

Reply 3 of 10, by Jo22

User metadata
Rank l33t++
Rank
l33t++
dnewhous wrote on 2021-03-27, 19:18:

What is the mechanism called when you use command.com and Windows switches to cmd.exe in the background on you automatically? I think it is adequate to say cmd.exe is invoked in the background.

NTVDM? Command.com can't run without NTVDM, since it's a 16-Bit Non-Windows application.
CMD, on the other hand, is a native CLI application for Windows NT.
Not sure if it uses the Win32 sub system or the Native API, though. 🤔

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 4 of 10, by dnewhous

User metadata
Rank Member
Rank
Member

Btw, the classic DOS command "mem" is no longer there in Windows 10.

Daniel L Newhouse

Reply 6 of 10, by dnewhous

User metadata
Rank Member
Rank
Member

64 bit.

Daniel L Newhouse

Reply 7 of 10, by Jorpho

User metadata
Rank l33t++
Rank
l33t++
dnewhous wrote on 2021-03-28, 15:20:

Windows xp or Windows 7 or even Windows 2000.

The 64-bit version of Windows 7, at least, does not have command.com .

Reply 8 of 10, by BloodyCactus

User metadata
Rank Oldbie
Rank
Oldbie

old windows 2k etc knows if the executable is a win32 NE/PE executable or a DOS NTVDM executable and does what it needs

--/\-[ Stu : Bloody Cactus :: [ https://bloodycactus.com :: http://kråketær.com ]-/\--

Reply 9 of 10, by Jo22

User metadata
Rank l33t++
Rank
l33t++
BloodyCactus wrote on 2021-03-28, 16:53:

old windows 2k etc knows if the executable is a win32 NE/PE executable or a DOS NTVDM executable and does what it needs

That's right, reminds me of VDMSound.. 😀
It hooks into context menu, but only for DOS programs (if memory serves).

To make things more complicated, though, some executable types can be combined.

On Window 3.x and OS/2, for example.
Their NE executables can contain both an DOS MZ stub ("This program requiresMS Windows") and the actual NE program code (Win, OS/2).

However, the stub can also be exchanged with a full blown DOS program.
Windows 3.x's setup.exe is such a special case.
It's both a DOS program and a 16-Bit Windows application.

The same thing must be possible with OS/2:
Hybrid DOS-OS/2 applications. I think Family API was the catch phrase.

Makes me wonder if that would allow for 16-Bit Presentation Manager/Windows hybrids.
However, that would result in two NE headers. Hmm.. Anyway, that's likely too of-topic for this thread/topic.

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 10 of 10, by Stiletto

User metadata
Rank l33t++
Rank
l33t++
dnewhous wrote on 2021-03-27, 19:18:

What is the mechanism called when you use command.com and Windows switches to cmd.exe in the background on you automatically? I think it is adequate to say cmd.exe is invoked in the background.

I believe you have this reversed, BTW.

In Windows XP, you could run cmd.exe and then switch to command.com by entering "COMMAND.COM" inside the Command Prompt window that cmd.exe presented (and if I recall correctly, you could exit back out of command.com too).

"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto