China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-26 11:22
中国DOS联盟论坛 » 其它操作系统综合讨论区 » 【Discovery】Is command.com unusable without cmd.exe?? View 1,862 Replies 8
Original Poster Posted 2009-04-05 10:19 ·  中国 广东 汕头 电信
初级用户
Credits 26
Posts 30
Joined 2008-12-20 02:46
17-year member
UID 134410
Gender Male
Status Offline
After deleting cmd.exe or setting permissions, it was found that command.exe became "invalid" and there was no response when typing commands. This is the case for XP, 2K, and 2K3 systems~! Could it be that command depends on cmd?
Floor 2 Posted 2009-04-05 11:49 ·  中国 湖北 荆州 洪湖市 电信
初级用户
★★
Credits 161
Posts 114
Joined 2009-02-20 13:00
17-year member
UID 139375
Gender Male
Status Offline
Hearing you say that, it seems so. I haven't tried it
Floor 3 Posted 2009-04-06 00:32 ·  中国 北京 联通
银牌会员
★★★
Credits 1,287
Posts 634
Joined 2007-05-02 15:06
19-year member
UID 87277
Gender Male
From cmd.exe
Status Offline
It can be understood that Cmd.exe provides a most basic environment.
Floor 4 Posted 2009-04-10 03:51 ·  中国 山西 电信
银牌会员
★★★
天的白色影子
Credits 2,343
Posts 636
Joined 2004-03-06 00:00
22-year member
UID 19350
Gender Male
Status Offline
Shouldn't be like this.
The command is just an entry to a sub-environment of ntvdm.
There's no necessary connection with cmd.
If ntvdm.exe is gone, the command will prompt that command is not found.
Floor 5 Posted 2009-04-12 18:07 ·  中国 广东 潮州 电信
初级用户
Credits 26
Posts 30
Joined 2008-12-20 02:46
17-year member
UID 134410
Gender Male
Status Offline
Originally posted by qzwqzw at 2009-4-10 03:51:
It shouldn't be like this
command is just an entry point of a sub-environment of ntvdm
There is no necessary connection with cmd
If ntvdm.exe is gone
command will prompt that command is not found

Really is like this! If you don't believe it, you can check it on your own computer!
Floor 6 Posted 2009-04-13 07:34 ·  德国 马克斯-普朗克等离子物理研究所
金牌会员
★★★★
Credits 3,467
Posts 1,616
Joined 2004-06-21 00:00
22-year member
UID 27148
Status Offline
That's right. The DOS emulators and OS/2 emulators in the NT environment both need the cmd.exe command-line interpreter.
Floor 7 Posted 2009-04-19 12:17 ·  中国 山西 电信
银牌会员
★★★
天的白色影子
Credits 2,343
Posts 636
Joined 2004-03-06 00:00
22-year member
UID 19350
Gender Male
Status Offline
Well, some strange places were found

Originally, I only tested that being able to open command.com was considered to work normally

It was found that many commands did not execute and output

Currently, the acceptable and executable commands tested are:

Drive letter jump c: d: e: and so on
Path jump cd
Prompt display and modification prompt
(And using prompt $t can get the system time)
Environment exit exit
Environment variable operation set
Floor 8 Posted 2009-04-19 15:30 ·  中国 山西 电信
银牌会员
★★★
天的白色影子
Credits 2,343
Posts 636
Joined 2004-03-06 00:00
22-year member
UID 19350
Gender Male
Status Offline
Through the tracking of procmon, it can be confirmed that ntvdm.exe does call cmd.exe to implement some command-line functions, including dir, cls, etc., and it is called using a very traditional interface. C:\WINDOWS\system32\cmd.exe /c DIR. But there are no such calls for commands like cd, prompt, etc.
Floor 9 Posted 2009-10-11 19:00 ·  中国 湖北 天门 电信
中级用户
★★
Credits 208
Posts 135
Joined 2009-09-12 12:00
16-year member
UID 151902
From 离恨天
Status Offline
Learning
Forum Jump: