Microsoft KB Archive/246766

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 17:13, 18 July 2020 by 3155ffGd (talk | contribs) (importing KB archive)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Base


Executable File Does Not Run from the Command Prompt in Windows NT

Article ID: 246766

Article Last Modified on 11/1/2006



APPLIES TO

  • Microsoft Windows NT Server 4.0 Standard Edition
  • Microsoft Windows NT Workstation 4.0 Developer Edition



This article was previously published under Q246766

IMPORTANT: This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry


SYMPTOMS

When you attempt to run an executable file or a batch file from the command prompt on a computer running Microsoft Windows NT Server 4.0 or Windows NT Workstation 4.0, the file may not run. When you then attempt to run the executable file from the Autoexec.bat file, using the %pathext% variable, the file still may not run.

CAUSE

This behavior can occur when a value is missing from the following registry key:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session
 Manager\Environment
                

RESOLUTION

WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

To resolve this issue, add the pathext value to the Environment key in the registry:

  1. Start Registry Editor (Regedt32.exe) and locate the following key:

    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session
     Manager\Environment
                        
  2. Add the value to the registry key:
    1. On the Edit menu, click Add Value.
    2. In the Value Name box, type the following:

      PATHEXT=.COM;.EXE;.CMD;.BAT

      NOTE: Add any extensions that need to be executable.
    3. In the Data Type list, click REG_SZ, and then click OK.
  3. Quit Registry Editor, and then restart the computer.



Additional query words: com exe bat

Keywords: kbprb KB246766