Multiple Copies of Command.com in Memory in MS-DOS Mode

Last reviewed: April 4, 1996
Article ID: Q149548
The information in this article applies to:
  • Microsoft Windows 95

SYMPTOMS

When you restart your computer in MS-DOS mode, the MEM command may report two or more copies of Command.com in memory.

CAUSE

This situation occurs for the following reasons:

  • Command.com loads itself in multiple pieces, which may be reported separately.
  • When you restart your computer in MS-DOS mode, Windows 95 checks the "Exit to DOS.pif" file. Or, when you run a program shortcut that specifies MS-DOS mode, Windows 95 checks the program information file (PIF) for the shortcut. In either case, Windows 95 uses that information to build a batch file that describes how MS-DOS mode should be configured. The batch file has the following structure:

          rem This is the batch file for MS-DOS mode
          <custom Autoexec.bat information>
          <custom batch file information>
          command.com
          <restart the Windows 95 graphical user interface (GUI)>
    

    After the Windows 95 GUI is shut down, Command.com runs the batch file. Therefore, two copies of Command.com are resident in memory. The outer copy runs the batch file and the inner copy processes your commands.

    When you type "exit" in the inner copy of Command.com, control is returned to the outer copy of Command.com, which restarts the Windows 95 GUI.

Note that two copies of Command.com require less than twice the amount of memory as one copy because the second and any subsequent copies share information with the first copy.

RESOLUTION

Instead of exiting to MS-DOS mode and then running the program manually, create a shortcut for the program and configure the shortcut to use MS-DOS mode. When you want to run the program, double-click the shortcut instead of exiting to MS-DOS mode manually.

For information about MS-DOS mode settings, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q134400
   TITLE     : General Tips for Using MS-DOS Mode


KBCategory: kbenv
KBSubcategory: win95
Additional reference words: 95


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 4, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.