Vehudis
29.07.2009, 10:30 |
loading of command.com (Users) |
Hi everybody,
could somebody tells me please, which method of loading the command.com is more practical: in config.sys with "SHELL=" or in autoexec.bat with "set comspec="?
Thanks for your replies in advance.
Vehudis |
Laaca

Czech republic, 29.07.2009, 20:36
@ Vehudis
|
loading of command.com |
You should definitely use the method via CONFIG.SYS and SHELL command.
The COMSPEC variable is intended to be read-only. --- DOS-u-akbar! |
Vehudis
29.07.2009, 20:48
@ Laaca
|
loading of command.com |
Does the command.com load with parameters, when loading from autoexec.bat? |
Rugxulo

Usono, 29.07.2009, 21:47
@ Vehudis
|
loading of command.com |
> Does the command.com load with parameters, when loading from autoexec.bat?
Not 100% sure what you're asking, but COMMAND.COM has to load in CONFIG.SYS if you plan on running any .BAT files (even AUTOEXEC.BAT). Otherwise you could pretty much use any shell. |
ecm

Düsseldorf, Germany, 29.07.2009, 23:45
@ Vehudis
|
loading of command.com |
> Does the command.com load with parameters, when loading from autoexec.bat?
The command line interpreter can't be loaded from AUTOEXEC.BAT.
The COMSPEC variable, which can be set in AUTOEXEC.BAT or in some DOS versions in CONFIG.SYS, only points to the file to use to reload a part of the program when it's necessary. Because of this, COMSPEC mustn't be followed by any parameters.
Setting COMSPEC in AUTOEXEC.BAT doesn't mean you have to remove the "SHELL=..." line in CONFIG.SYS. --- l |
Laaca

Czech republic, 30.07.2009, 08:21
@ ecm
|
loading of command.com |
There is one case when has sense to modify the COMSPEC variable.
It is running the secondary shell.
Try to write on command line "COMMAND". It will start a new instance (copy) of the command interpretter. You can end it and return into previous instantion by "EXIT" command.
Variant of this trick use various file managers like Norton commander. In this case you can by specifying the COMSPEC variable define which secondary shell will be used.
However I am not sure whether secondary shell completely overtakes the work of the primary command interpretter or if they work together in some way. --- DOS-u-akbar! |
ecm

Düsseldorf, Germany, 30.07.2009, 08:50
@ Laaca
|
loading of command.com |
> Variant of this trick use various file managers like Norton commander. In
> this case you can by specifying the COMSPEC variable define which
> secondary shell will be used.
>
> However I am not sure whether secondary shell completely overtakes the
> work of the primary command interpretter or if they work together in some
> way.
This only works with file managers or other programs that "shell to DOS" by actually executing the file specified as COMSPEC. The resident part of COMMAND.COM however reloads its transient part from that file so you can't load another shell by setting COMSPEC to a "wrong" file (which doesn't contain the transient part of the running COMMAND.COM), unless the new shell is compatible to the running COMMAND.COM. Pointing COMSPEC to a wrong file might raise an error if the running shell tries to use that file. --- l |
Ninho

08.08.2009, 13:37
@ ecm
|
loading of command.com |
There is an almost infinite realm open to creative types.
My Windows 98/DOS 7 config.sys has (inside its main [MENU] configuration) :
SET COMSPEC=C:\WINDOWS\COMMAND.COM
SHELL=C:\WINDOWS\WIN.COM
... and no autoexec.bat is used or needed.
Having the "DOS" shell to be win.com like this has its advantages and small drawbacks too. I happen to like this way. :=) --- Ninho |