重命名 MS-DOS 内部命令
是否可以通过任何方式重命名 DOS 的内部命令?首先,我这样做是为了了解一些 DOS 的内部结构和可能性。到目前为止,我已将内部命令 CLS 更改为 XLX(在 Windows XP 上)。但命令名称 XLX 未执行。我附上2张截图供参考。最重要的是,这整个活动只是我的好奇心。
Is it possible by any means to rename the internal commands of DOS? Firstly, I am doing this to learn a bit about the internals and possibilities of DOS. So far I have changed the internal command CLS to XLX (on Windows XP). But the command name XLX isn't executing. I am attaching 2 screenshots for the reference. Above everything else, this whole activity is just my curiosity.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您运行的 shell 不是 DOS,也不是
command.com
;正如窗口标题所示,它是cmd.exe
,这是一个完全不同的程序。如果您运行 DOS 命令解释器,您的更改可能实际上会起作用 - 这可能会或可能不会像从 cmd shell 运行命令
那么简单。That shell you're running isn't DOS and it isn't
command.com
; as the window title indicates, it'scmd.exe
which is a different program entirely. Your changes might actually work if you were running the DOS command interpreter — which might or might not be as easy as just runningcommand
from the cmd shell.看来您只更改了包含有关 CLS 命令的文档的字符串。我怀疑某处还有另一个“CLS”字符串。
很难确定,因为 command.com 是闭源软件。您可以做的一件事是使用 debug 或其他调试器(ollydebug 是一个免费的 GUI 调试器)来跟踪运行 CLS 时发生的情况,并找到 command.exe 决定执行 cls 命令的条件跳转。
It looks like you have only changed the string containing documentation about the CLS command. I would suspect that there is another "CLS" string somewhere.
It is difficult to know for sure because command.com is closed source software. One thing you could do is use debug or another debugger (ollydebug is a free GUI debugger) to trace out what happens when you run CLS and find the conditional jump where command.exe decides to perform the cls command.
COMMAND 将尝试运行 CMD 的内部命令,至少在 Vista 上是这样。
要查看差异,请尝试启动 COMMAND,然后启动命令 VER。 COMMAND /C VER 会给出不同的结果,所以如果你做得正确,你应该尝试“COMMAND /C XLX”。我不知道这是否有效。
COMMAND will try to run CMD's internal commands, at least on Vista.
To see the difference try starting COMMAND, and then the command VER. COMMAND /C VER will give a different result, so if you did it right you should try "COMMAND /C XLX". I have no idea if that will work or not.
更改内部命令 mgiht 会对您的注册表内容造成危险。因此,根据我的经验,我建议您在备份数据后或在虚拟机上进行实验是最可取的。
changing the internal command mgiht cause danger to yoiur registry content.. so i suggest you to oerform your experiment after having a backup of your data or on a virtual machine is most preferable as per my experience..