COMMAND.COM HIDDEN PARAMETERS
COMMAND.COM is the MS-DOS mode command line interpreter, located by default in %winbootdir% + %winbootdir%\COMMAND (default is C:\WINDOWS + C:\WINDOWS\COMMAND) [Windows 95/98/ME, a.k.a. MS-DOS 7.00/7.10/8.00], C:\DOS or C:\MSDOS [MS-DOS 5.00/6.xx]. Another copy of COMMAND.COM may exist in C:\ root.
IMPORTANT: To become familiar with the COMMAND.COM command line switches (the documented ones anyway):
All COMMAND.COM parameters listed below can be used on the CONFIG.SYS file SHELL= line (primary permanent shell):
- Windows 95/98/ME users: use Notepad to read the "SHELL" topic from CONFIG.TXT, a text file located in your Windows folder.
- All Windows/DOS users: run:
at any DOS prompt to display the COMMAND.COM help screen.
- MS-DOS 6.xx users: run this command from a DOS prompt:
and read the topic.
- More info.
SHELL=C:\COMMAND.COM C:\ /E:512 /D /F /T /Z
on a Windows PIF file (MS-DOS Prompt application) command line, in batch files, or/and at the plain DOS prompt (secondary shell, which can be made permanent if adding the /P switch).
In MS-DOS 5.00 - 6.22 you can use this undocumented workaround to force COMMAND.COM to load "high", which requires an upper memory manager in CONFIG.SYS, like EMM386.EXE or UMBPCI.SYS. Example:
SHELL=C:\COMMAND.COM /C LOADHIGH=C:\COMMAND.COM C:\ /E:512 /P
This works ONLY IF:
DISADVANTAGE: In some cases a second copy of COMMAND.COM remains resident in (upper) memory. :(
- a copy of your COMMAND.COM file resides in C:\ root (for compatibility with older DOS programs/games that expect to find the command interpreter in the root directory of your boot drive/partition);
- ALL your "SET <variable>=" lines are placed/moved into your AUTOEXEC.BAT file from CONFIG.SYS (MS-DOS 6.00 - 6.22 ONLY);
- this command exists as your first AUTOEXEC.BAT line:
- UMBs are enabled by this CONFIG.SYS line so COMMAND.COM (or ANY other device/driver/TSR) can load in UMA:
In MS-DOS 7.00 - 8.00 [a.k.a. Windows 95/98/ME] this function is built into IO.SYS, and COMMAND.COM loads in UMA (Upper Memory Area) automatically ONLY IF UMBs (Upper Memory Blocks) are provided by an upper memory manager like EMM386.EXE or UMBPCI.SYS, and IF the line "DOS=HIGH,UMB" exists in CONFIG.SYS.
- COMMAND /D [MS-DOS 5.00 and above ONLY]
COMMAND /D (DENY) performs different actions depending on the MS-DOS version:
- in MS-DOS 5.00: used on the CONFIG.SYS file SHELL= line prevents the execution of the AUTOEXEC.BAT file (if present) at bootup.
- in MS-DOS 6.xx and 7.xx/8.00 [a.k.a. MS Windows 9x/ME]: disables the automatic disk "Fail" response if enabled by the /F (FAIL) parameter (see "COMMAND /F" below).
- COMMAND /F [MS-DOS 6.00 and above ONLY]
COMMAND /F (FAIL) removes the "Abort, Retry, Fail" message and forces a "Fail" response to all "Abort, Retry, Fail" prompts issued by the DOS critical error handler. If the disk is not ready it automatically goes to "Fail".
- COMMAND /T [Windows 95 + MS-DOS 7.00 and above ONLY]
COMMAND /T forces the COMMAND.COM resident module to load permanently in low memory (below the 640K barrier), even if the Upper Memory Area (UMA) is enabled by an upper memory manager (i.e. EMM386.EXE or UMBPCI.SYS) from CONFIG.SYS.
Using /T in combination with the /P (PERMANENT) parameter, ONLY from the DOS prompt or in batch files (NOT from the CONFIG.SYS SHELL= line), also executes the AUTOEXEC.BAT file (if present), besides forcing the COMMAND.COM resident module to load permanently in low memory.
WARNING: Using /T on the CONFIG.SYS SHELL= line may lock up Windows 9x/ME GUI upon shut down!
- COMMAND /Z [Windows 95 + MS-DOS 7.00 and above ONLY]
COMMAND /Z (ZERO) displays the "ERRORLEVEL" return code messages after executing external DOS commands (internal DOS commands do not display error codes in this manner).
You'll see a message like this when using the /Z parameter [errorlevel 0 is the default (normal) return code]:
"Microsoft(R) Windows 98
(C)Copyright Microsoft Corp 1981-1999.
Return code (ERRORLEVEL): 0
WARNING: Reloaded COMMAND.COM transient"
BACK 2 CONTENTS