TipT254


Document 254

DOS ERRORS: ENVIRONMENT SPACE, COMMAND.COM


The causes and the cures for some common DOS error messages


Out Of Environment Space

This message may appear if you try to use the SET command while shelled to DOS from New Deal or when running a batch file or a launcher.

Unless a batch file is run with a command interpreter that has been given the /e parameter, the batch file may not be able to add new variables.

People normally deal with this by setting the primary interpreter’s environment space to be as big as they need, then fill in the unused space with bogus environment variables that may be unset in their batch files to make room for new variables.

The amount of environment space is fixed by DOS when you boot your machine. Normally, a relatively small amount of space is allocated, like 256 bytes. It can be increased at boot time by adding a line like

shell=c:\command.com /e:1024

to your CONFIG.SYS file, which would allocate 1024 bytes for environment space.

Things that use up the environment space are your PATH variable and any DOS shell variables that you set (these are normally set in your AUTOEXEC.BAT file and look something like set LIB=c:\library).

Invalid COMMAND.COM or Cannot Locate COMMAND.COM

If you get one of these errors, make sure that there are not two different versions of COMMAND.COM on the hard drive.

One of these error messages may appear when trying to run a DOS program if the file COMMAND.COM, sometimes called the command processor, is corrupt or if it is located on a drive that DOS or New Deal cannot find. Perhaps the command processor (either COMMAND.COM or some other such as 4DOS.COM) is loaded in a RAM drive that New Deal does not recognize. If NewManager does not recognize or display the drive, then it cannot find the command processor on that drive.

COMMAND.COM has a resident and a transient portion. The transient portion may be overwritten by any program COMMAND.COM loads. DOS forms a checksum of the bytes in the transient portion and compares the checksum when the program it ran exits against the checksum it formed before running the program. If the sum is different, it reloads the transient portion from the file given in the COMSPEC variable. The two files (the one initially loaded and the one specified by COMSPEC) must be byte-for-byte identical files, or you get the Invalid COMMAND.COM message.

The best way to change shells is via a „SHELL=“ line in CONFIG.SYS, not by setting the COMSPEC variable in AUTOEXEC.BAT. Specifying SHELL= will cause COMSPEC to be defined with the correct value.

If you are running on a Novell network and get an INVALID COMMAND.COM, SYSTEM HALTED error, here’s some information that might help.

In your netware login script, where you’ve got your network drives set up with MAP commands, use instead the MAP ROOT command. Basically, the map command goes something like

MAP X:=COMPANY\SYS:

The line will be different for your network, but you get the idea. At your workstation, the server directory COMPANY\SYS appears as drive X. If you log onto drive X: in this example and then type CD\, you will be able to back out all the way to the root directory of the server’s COMPANY drive.

Most people won’t do this in the normal course of events, but New Deal will allow it, since it searches for the root of every drive. So if you’re counting on a COMMAND.COM that’s sitting in COMPANY\SYS, it may not be locatable when you exit New Deal.

The MAP ROOT command (which should really be the default) keeps New Deal from backing out past the desired directory.

It’s not New Deal, but COMMAND.COM that does the searching for COMMAND.COM after exiting New Deal, and it always looks at the COMSPEC variable to find itself; it doesn’t do any searching along the path or anything of that nature.

The map root command can use this syntax:

map root f:=berkeley:users\%login_name

This command is often in the System Login Script.

    • berkeley in this example is a disk partition
      users is a directory at the top level of berkeley
      %login_name is a variable that equals the name of the person logging in (i.e. this same script is run for everyone, with „if“ statements controlling what groups get what drives, etc.).

If you leave out the root, then you will get F: as usual, but you will be able to cd .. and go up the directory tree. The root word makes any directory into a fake drive, basically.


Last Modified 17 Feb 1999
©2000 NewDeal Inc. All rights reserved


BlankHomeBlank
Eine Seite zurück

Kommentare sind geschlossen.