[comp.sys.ibm.pc] Command.com ISN'T invalid

bradley.grigor@canremote.uucp (BRADLEY GRIGOR) (12/16/89)

Re:
  INVALID COMMAND.COM
  SYSTEM HALTED

U>I run PCDOS 3.3, and this happens for me too. But very seldom, maybe
U>once every other month. I suppose it has to do with the non-resident
U>part of command.com (in high memory) being written over by an
U>application, which necessitates it to be reloaded from disk. For some

  This is my suspicion too.

U>reason, DOS seem not to find it. I haven't looked into this, because
U>it's no big problem for me. Could it have something to do with
U>redefining SWITCHAR to '-'? I do that on my machine. Maybe it means
U>DOS cannot find the path given by the COMSPEC env. variable?

  I have not redefined the SWITCHAR but I have added 64K and patched
  my system for 704K.  I first noticed the "INVALID COMMAND.COM" after
  making that change.  Any clues here?


Brad Grigor
Mainline Technologies
bradley.grigor@canremote.uucp
---
 ~ EZ-Reader 1.21 ~ Give me a good 84-key keyboard anyday!

bl@infovax.UUCP (Bj|rn Larsson) (12/19/89)

In article <89121614031714@masnet.uucp> bradley.grigor@canremote.uucp
(BRADLEY GRIGOR) writes:
>Re:
>  INVALID COMMAND.COM
>  SYSTEM HALTED
>U>it's no big problem for me. Could it have something to do with
>U>redefining SWITCHAR to '-'? I do that on my machine. Maybe it means
>U>DOS cannot find the path given by the COMSPEC env. variable?
>
>  I have not redefined the SWITCHAR but I have added 64K and patched
>  my system for 704K.  I first noticed the "INVALID COMMAND.COM" after
>  making that change.  Any clues here?
>
I do that too, using QEMM (Quarterdeck Extended Memory Manager). How-
ever, I had this problem long before I started to use the 386 memory
mapping features (at least I'm 98.5% certain about this). ON the
other hand it sounds interesting - those re-mapped 64k, above 640k,
is where the memory resident copy of COMMAND.COM will be. But the
fact that the error is 'cannot find it' indicates it is not found
*on the disk*. Not finding it in memory is normal, and causes the
re-load from disk.

For what it's worth...:->				Bjorn

-- 
 ====================== InfoVox = Speech Technology =======================
 Bjorn Larsson, INFOVOX AB      :      ...seismo!mcvax!kth!sunic!infovax!bl
 Box 2503                       :         bl@infovox.se
 S-171 02 Solna, Sweden         :         Phone (+46) 8 735 80 90

Devin_E_Ben-Hur@cup.portal.com (12/20/89)

The problem with "INVALID COMMAND.COM -- SYSTEM HALTED" does have to do
with attempting to reload the transient portion of COMMAND.COM from disk.

The problem is that the resident portion of COMMAND.COM *ignores* the COMSPEC
environment variable.  If your shell is loaded from other than the root
directory of the boot drive, the transient reload will fail unless you
specify the correct re-load path as a parameter to COMMAND.COM in the initial
SHELL= line of CONFIG.SYS.  So, if your COMMAND.COM is located in a
directory named DOS on drive C, your CONFIG.SYS should have a line like:
 
SHELL=C:\DOS\COMMAND.COM C:\DOS /P <other switches>
                         ^^^^^^ -- this tells it where to reload from.
Note that, when the reload path is specified in the shell= line, there
is no need to set comspec in your autoexec.bat, command.com will automatically
make "COMSPEC=<load-path>\COMMAND.COM" the first line of your environment.

Devin_Ben-Hur@Cup.Portal.Com
...ucbvax!sun!portal!cup.portal.com!devin_ben-hur

leonard@bucket.UUCP (Leonard Erickson) (12/24/89)

Devin_E_Ben-Hur@cup.portal.com writes:

<The problem with "INVALID COMMAND.COM -- SYSTEM HALTED" does have to do
<with attempting to reload the transient portion of COMMAND.COM from disk.

<The problem is that the resident portion of COMMAND.COM *ignores* the COMSPEC
<environment variable.  If your shell is loaded from other than the root
<directory of the boot drive, the transient reload will fail unless you
<specify the correct re-load path as a parameter to COMMAND.COM in the initial
<SHELL= line of CONFIG.SYS.  So, if your COMMAND.COM is located in a
<directory named DOS on drive C, your CONFIG.SYS should have a line like:
< 
<SHELL=C:\DOS\COMMAND.COM C:\DOS /P <other switches>
<                         ^^^^^^ -- this tells it where to reload from.
<Note that, when the reload path is specified in the shell= line, there
<is no need to set comspec in your autoexec.bat, command.com will automatically
<make "COMSPEC=<load-path>\COMMAND.COM" the first line of your environment.

I must disagree with you. Some versions of DOS may act this way, but not all.
I ran a two disk system for *months* with comspec pointing to a copy of
COMMAND.COM in a ramdisk. And none of the reloads failed. There was no SHELL
line in my CONFIG.SYS, just a SET COMSPEC=C:\COMMAND.COM in my
AUTOEXEC.BAT. I know that reloads were occuring, because I'd had to set up
the ramdisk so I didn't get prompted for "inesrt disk with COMMAND.COM"
all the time.

Do note that DOS will cheerfully use a copy of command.com in the *current*
directory for reloading. So it pays to make sure that you only have *one*]
copy on your HD!
-- 
Leonard Erickson		...!tektronix!reed!percival!bucket!leonard
CIS: [70465,203]
"I'm all in favor of keeping dangerous weapons out of the hands of fools.
Let's start with typewriters." -- Solomon Short