Command Prompt Returns to Prompt Without Running Application or Command (301484)



The information in this article applies to:

  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Professional
  • Microsoft Windows NT Server 4.0
  • Microsoft Windows NT Workstation 4.0

This article was previously published under Q301484

SYMPTOMS

Some DOS commands and 16-bit programs may not run from a command prompt. For example, if you type the dir command, and then press ENTER, nothing is displayed as shown in the following example:

C:\> dir

C:\>

CAUSE

This behavior occurs because the ComSpec system environment variable is not pointing to a valid location for Cmd.exe file. Command.com is dependent on the Cmd.exe file. If you move or delete the Cmd.exe file, you will encounter this behavior.

RESOLUTION

To resolve this behavior, run Cmd.exe from the location to which you moved it, or update the ComSpec system environment variable to point to Cmd.exe.

To update ComSpec on a Windows NT 4.0-based computer:
  1. Click Start, point to Settings, click Control Panel, and then double-click System.
  2. On the Environment tab, click ComSpec.
  3. In the Value box, type the location of the Cmd.exe file, and then click Set. The default setting is: %SystemRoot%\System32\Cmd.exe.
  4. Click Apply.
To update ComSpec on a Windows 2000-based computer:
  1. Click Start, point to Settings, click Control Panel, double-click System, and then click Advanced.
  2. On the Environment tab, click ComSpec, and then click Edit.
  3. In the Variable Value box, type the location of the Cmd.exe file, and then click OK. The default setting is: %SystemRoot%\System32\Cmd.exe.

MORE INFORMATION

This problem can occur after following the steps that are described on the following Microsoft Web site: In these directions, it is recommended to move the Cmd.exe file to a different folder to make IIS more secure.

Modification Type:MajorLast Reviewed:5/13/2003
Keywords:kbenv kbprb KB301484