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

ID: Q149548


The information in this article applies to:
  • Microsoft Windows 95
  • Microsoft Windows 98


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 checks the "Exit to DOS.pif" file. Or, when you run a program shortcut that specifies MS-DOS mode, Windows checks the program information file (PIF) for the shortcut. In either case, Windows 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 graphical user interface (GUI)>
      
    After the Windows 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 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

Keywords : kbenv win95 win98
Version : 95
Platform : WINDOWS
Issue type : kbprb


Last Reviewed: January 28, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.